There is a online user counter in my website.
I refresh the page per five minutes because I hope the counter is always newest.
But I got a problem, the session will never timeout.
Even the users idle in one page without doing anything, they don't even get timeout.
So I am considering to use the mechanism of AJAX because it only need to refresh partial section in the page.
Does it work ,or is there any better solution to deal with it?
Does AJAX affect session timeout?
Page 1 of 13 Replies - 114 Views - Last Post: 05 February 2013 - 09:47 AM
Replies To: Does AJAX affect session timeout?
#2
Re: Does AJAX affect session timeout?
Posted 05 February 2013 - 06:05 AM
Quote
Does AJAX affect session timeout?
of course. AJAX does a HTTP Request, sending along all cookies (etc.). therefore the server can not (easily) tell (maybe with some extended Header analysis), whether the HTTP Request comes from JavaScript (AJAX) or the user (page (re)load) and hence the session is updated as well.
#3
Re: Does AJAX affect session timeout?
Posted 05 February 2013 - 08:49 AM
#4
Re: Does AJAX affect session timeout?
Posted 05 February 2013 - 09:47 AM
there are several possibilities, though.
option one: you could try to remove the session id/cookie
option two: manually send a request that terminates the session
option one: you could try to remove the session id/cookie
option two: manually send a request that terminates the session
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote




|