FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Expire session on browser close or back button
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Expire session on browser close or back button [message #172870 is a reply to message #172868] Mon, 07 March 2011 12:55 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(mohan)

> I am developing one website in which I have the following requirements
> which are pretty much similar to banking website behavior:
> - Expire session when browser is closed

Happens automatically with session cookies.

> - Expire session when user clicks on back button of browser

Not possible. What really happens when moving back one page is left to
the browser. It may request the previous page again or simply serve it
from its cache. Nothing wrong with that.

Some applications may have a problem with that, especially if there's
heavy use of AJAX and the like. But that's a problem in the application,
not in the browser's behaviour.

> - Do not show the page if user directly copy pastes the URL to
> navigate to a page

Why not? The browser has to send a request to the server, so the user
can always see the URL and may open it directly in another tab for
example. And from the server's POV it doesn't make a difference whether
the user followed a link or directly copied the URL into the browser's
address bar. In the first case there might be a referrer header, but you
can't safely rely on that.

Maybe you can explain in some more detail why you need alle the above
(except for the first issue, which is nothing special).

Micha
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: hai
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 18:25:54 GMT 2024

Total time taken to generate the page: 0.03325 seconds