2

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.

splattne
  • 28,508
  • 20
  • 98
  • 148
Dejan.S
  • 233
  • 1
  • 3
  • 11
  • 1
    Multiple levels of cache. If you need more specific information, describe the symptoms in as much detail as possible. – TristanK Dec 08 '11 at 23:09

1 Answers1

1

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.

Marco Miltenburg
  • 1,121
  • 8
  • 9
  • its not client server issue. but can i at this level in the output caching set what files/file types i dont want it to cache? – Dejan.S Dec 09 '11 at 13:29
  • You enable the cache on a per file extension type. You have to specifically enable it, it's not something you can turn on globally and then disable per file type. – Marco Miltenburg Dec 09 '11 at 16:05