我想打从JavaScript客户端上的周期性后台请求我的Web应用程序(ASP.NET,IIS 7),但我不希望影响到ASP.NET会话超时请求。
I would like to make a periodic background request from JavaScript on the client to my web application (ASP.NET, IIS 7), but I don't want the request to affect the ASP.NET session timeout.
有没有办法做到这一点?
Is there a way to do this?
您必须避免您的要求发送Cookie,因为这是多么会话ID传送。
You have to avoid sending cookies with your request because that's how session ids are transmitted.
如果你有一个xmlHTT prequest对象,你可以通过调用 xmlHTT prequest.setRequestHeader(曲奇,)删除您的cookie头;
If you have an xmlHTTPRequest object, you can remove your cookie header by calling xmlHTTPRequest.setRequestHeader("Cookie", "");