How to use AJAX to get information from the server without resetting the session timeout?

I would like to make a periodic background request from JavaScript on the client to my web application (ASP.NET, IIS 7), but I do not want the request to affect the ASP.NET session timeout.

Is there any way to do this?

+4
ajax timeout session
source share
1 answer

You need to avoid sending cookies with your request because this is how session identifiers are transmitted.

If you have an xmlHTTPRequest object, you can delete your cookie header by calling xmlHTTPRequest.setRequestHeader("Cookie", "");

+1
source share

All Articles