[whatwg] When closing the browser

Philipp Kempgen philipp.kempgen at amooma.de
Mon Apr 27 12:57:46 PDT 2009


Ian Hickson schrieb:

> One option would be to have an attribute, say <body logout="">,

Maybe <link rel="logout" href="..."> is more suitable?

> which 
> causes the user agent to ping the site when the window is closed and there 
> are no other windows open to the same origin.
> 
> Of course this would break if the other window in question was open to a 
> different page that didn't have the logout="" attribute..
> 
> Maybe it should be invoked if there are no other pages open that have the 
> same logout="" attribute?

Sounds ok to me.

Server-side applications should probably implement that in a way such
that just one session (identified by a session cookie or whatever)
gets logged out -- in contrast to all sessions of a user.
The user might be logged in using 2 different browsers and might
want to log out in one browser but keep the session active in the
second one.

And I'd probably want a same domain policy for the logout ping be
implemented in the browser.

-- 
    Philipp Kempgen



More information about the whatwg mailing list