views:

33

answers:

1

Hi,

We are setting Window.Location through JavaScript depending on the value selected by the user in a dropdown. The url we are setting the location to does not have HTTP Caching set up explicitly.

However, we have observed that in certain cases, the expires header is set in the future by 1 second. Whenever this happens, changing window.location stops working for subsequent requests (even after waiting out for more than a second) as IE caches the response.

The Response Headers:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Date: Wed, 04 Nov 2009 10:51:22 GMT
Expires: Wed, 04 Nov 2009 10:51:23 GMT
ETag: 0
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Content-Length: 23405

Is there something wrong with what we are doing?

Kind regards,

A: 

This is not an answer, just to provide some comparison to help.
The Response header I got for this page is:

Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Expires: Wed, 04 Nov 2009 11:19:14 GMT
Vary: Accept-Encoding
Server: Microsoft-IIS/7.0
Date: Wed, 04 Nov 2009 11:19:14 GMT
Content-Length: 7717

The only difference I can tell is the Expiry and the Date. This is 0 diff, yours is 1 second.

o.k.w
Yes, that exactly the problem. The pages where the diff is 0 all seem to work correctly. But some requests get the expires set in the future by 1 sec. Why?
SharePoint Newbie