W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2009

[whatwg] AJAX History Concerns

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 24 Nov 2009 01:01:42 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0911240042240.27661@hixie.dreamhostps.com>

On Fri, 13 Nov 2009, Justin Lebar wrote:
> On Thu, Nov 12, 2009 at 5:43 PM, Ian Hickson <ian at hixie.ch> wrote:
> > The idea is that the string you would put into the back button or 
> > history menu is not the same as the string you would put into the 
> > title bar or bookmarks (i.e. not the same as <title>).
> 
> That doesn't seem too unreasonable, but I think it's strange to set that 
> title through push/replaceState, since an alternate page title is 
> orthogonal to the idea of an AJAX page with state objects.

No more so than an alternative URL, surely?


> It might be confusing to expose this alternate title in the document 
> object, but perhaps we could expose it as a property or setter function 
> somewhere else.  Then we could persist it properly across forward / 
> backs within the same document.

It seems like that would just cause everyone to call pushState() and 
updateTitle() instead of just calling pushState(), except that then people 
would forget to update the title and your history would have a bunch of 
silly-looking titles like "Inbox (3)", "Inbox (20)", "Inbox (4)".


> > document.title is often used to include things like unread count in a 
> > mail client or RSS reader. That's orthogonal from the state you would 
> > want to show in the back button ("Inbox", "Spam folder", "Settings", 
> > or whatever).
> 
> In this case, it seems like we'd want the bookmark title to use the 
> pushState title, not document.title (e.g. the bookmark would read 
> "Inbox", not "Inbox (8)").

Indeed. Or the title at page load, before dynamic changes.


On Mon, 16 Nov 2009, Mike Wilson wrote:
> 
> It might be good to spell out the fact that 
>   sessionHistoryEntry.title 
> has nothing to do with 
>   document.title
> a bit more explicitly in the text, as this seems to be
> easily misinterpreted (maybe because of the use of the
> "title" identifer?).
> 
> Maybe adding a note to 6.10.1, and/or expanding the note
> about title in 6.10.2 would be good?

Done.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 23 November 2009 17:01:42 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:19 UTC