开发者

Session invalidate is not working because of continuous ajax call

My application sends simple ajax http request to server every 3 minutes.

And because ajax request update httpd session info, session timeout is not working, even

though开发者_如何学JAVA I set 30 minute default session timeout.

Is there any way to keep away from updating httpd session timeout info with continuous ajax request ?

I want http session invalidate after 30 minutes, regardless of continuous ajax request.


You can create a session variable with a timestamp as value.

Everytime a user request a page you can update the timestamp.

Except when it is the Ajax request.

Everytime the Ajax request takes place you can check whether 30 mins have gone by and if so destroying the session.

That´s the only way I can think of.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜