Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to set cache related header for a specific file type in II6? We want to turn off cache on all our *.js and *.css file here, but IIS6 is forcing us to do a all or nothing approach.

share|improve this question

migrated from Aug 14 '09 at 23:43

This question came from our site for professional and enthusiast programmers.

For each folder containing the files you want to cache, open it's properties page, and under the HTTP Headers tab, set expiration date to something like 2050-12-31

share|improve this answer
If you want to disable cache (which the OP does), you need to set the expiry to a date less than today (say, yesterday, or 1990 or something) – Mark Henderson Nov 11 '09 at 1:21

You can set caching for individual files in IIS6 by right-clicking the file in the Content pane, going to Properties and setting the cache settings, or as rodiaz suggested, doing it to an entire folder.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.