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.

link|improve this question
feedback

migrated from stackoverflow.com Aug 14 '09 at 23:43

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

2 Answers

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

link|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
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown