We are using short polling in Jquery to periodically send ajax requests to server to check if there are any updates on the server. polling works fine but because of this, session is always kept active. And the session never gets timedout unless user manually logsout or closes the browser. This can be achieved by setting timeout in polling itself but we want to handle timeout logic in server side.
Is there any way to keep the session idle during these ajax calls. Or we need to handle the timeout manually.
We are using tomcat as application server, spring mvc for view and controller. I have set the session timeout as soon as the new session is created.
session.setMaxInactiveInterval(7200); //2hrs
Any help in this regard is appreciated.
Thanks, Ekanath