IIS5/6: Disable caching?

DJFuji

Diamond Member
Oct 18, 1999
3,643
1
76
i've noticed this on several different servers now. Not sure if it's a server problem or a client problem (maybe both). I'll update a page on the IIS server, but users won't see the changes until they hit F5. Isn't the browser supposed to automatically pull down new content when it detects it? Or is the server caching that content until the user manually refreshes? If so, is there a way to disable that?
 

phillydog

Senior member
Dec 19, 2001
472
0
0
I believe this is a client's browser issue (if this issue hasn't already been answered).
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
It's a combo of the two. The server may send headers in an http response to tell the client whether or not to cache a file and for how long. The client can also send requests asking for a page only if it has changed since a certain date.

If iis isn't sending any caching info when clients first get the pages they may cache them until they feel like checking for a new copy (who knows how long?). Ideally the server knows when pages are going to change and tells the client how long content will be good for. Barring that, as is probably your case, the server will just not send caching info and the client should be checking everytime. That doesn't usually work very well though, especially for static content.

Anyways, the first thing I would do is check out the http headers that are going through when a client requests a page. This can be done easily with the LiveHTTPHeaders extension for firefox or Ethereal. If no actual requests are hitting the server for old pages then you know the client is caching and not checking for new copies. If you see a "If-Modified-Since" type header in the request but still don't get the up to date version then iis is not detecting your changes properly.

You can also tell iis some explicit cache management parameters by opening the Properties dialog for a folder or an individual file and going to the HTTP Headers tab. (In the management console for iis, that is.)