Iis – Does IIS 7.5 keep cache

iisiis-7iis-7.5

I'm having some issues with a project of mine I'm doing. Things work smooth on my local machine during development and it works flawless on the test server we got at the company.

The problem Is, when I upload the site to our live server and the result is totally different then from the test server. The main issue is with .js (javascript) files. Im having some thoughts and i think that the server some how keeps a cache, can that be possible?

My problem becomes with javascript files that changes does not take the changes. so that would be great if there was a way of clearing the cache on server level.

Best Answer

Yes, IIS does support output caching but it's more likely that you are being affected by client side browsing caching. The different behavior between the live and development website are most likely due to a different server configurations.

First of all you should use a tool like Fiddler or the 'net' monitoring tab in Firebug to make sure the browser is requesting the files from the server. Most likely it's not. In that case, the headers sent by the server allow the browser to cache the javascript file. You should then go into IIS Mananger and go the 'HTTP Response Headers' icons and click on the 'Set Common Headers' link on the right. Check if there are any expire rules set.

If the browser does make the request but IIS is returning the old version of the file, go to the 'Output Caching' icon and verify the user mode or kernel mode caching rules there.