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 #172873 is a reply to message #172872] Tue, 08 March 2011 11:51 Go to previous messageGo to previous message
bill is currently offline  bill
Messages: 310
Registered: October 2010
Karma:
Senior Member
On 3/8/2011 5:31 AM, mohan wrote:
> On Mar 7, 5:55 pm, Michael Fesser<neti...@gmx.de> wrote:
>> .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
>
> Hi,
>
> Thanks for the inputs. We are developing a site that has some payment
> related functionalities. Our client wanted to have the above 3
> mentioned session related handling exactly the way it is done in
> banking websites. So we are looking for options on implementing the
> same.

Although it may not be reliable, you can check the referrer to
see where the customer came from or you can put time references
into the E_SESSION array.
Or you can deconstruct the banking websites and tell us all how
they do it.

bill
[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: Fri Sep 20 06:40:58 GMT 2024

Total time taken to generate the page: 0.05492 seconds