Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com Aug 14 '09 at 23:43

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

2 Answers 2

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

 
discard

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