How do I use AJAX to GET info from server without

2019-06-26 06:21发布

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?

1条回答
Luminary・发光体
2楼-- · 2019-06-26 07:06

You have to avoid sending cookies with your request because that's how session ids are transmitted.

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

查看更多
登录 后发表回答