How do I turn off caching in IIS7?

27

5

I'm developing an ASP classic site under Windows 7 (form a queue ladies). The problem is IIS seems to be heavily making use of its cache for both static and dynamic content which really conflicts with my 'make a small change, alt-tab, hit ctrl-F5' development style. Changes made to .asp files may take two or three refreshes to show up where as changes to .js files can take 20 times as many. How do I go about turning the caching off on my development machine?

Cheers.

in b4 stop using asp classic

jammus

Posted 2009-10-30T10:52:57.583

Reputation: 1 274

Answers

26

Click on the server name then go to output caching.

Click Add Cache Rule then type the extensions - .aspx, .aspx.vb, .aspx.cs, .js etc. (not sure if you can do all on one)

Then simply either tick the prevent all caching or untick user-mode caching and it should stop IIS from keeping a cache of the pages.

Next time you do a full refresh, it should get the files from the hard drive and not the cache/memory




I do not currently have a machine with IIS7 on that I can muck around with so I Googled and found the picture below:

alt text

William Hilsum

Posted 2009-10-30T10:52:57.583

Reputation: 111 572

This sorted out my issue with caching the responses from a WCF service as well – ste-fu – 2015-12-09T16:40:53.000

You just made my day William. Thanks for that, it totally fixed my issue. Cheers! – alexGIS – 2019-05-09T22:21:39.073

1

This blog might help: Response caching in IIS7.

It explains how this functionality can be controlled by editing system.webServer/caching section or by using IHttpCachePolicy intrinsic.

harrymc

Posted 2009-10-30T10:52:57.583

Reputation: 306 093

0

This answer helped me, (note: i'm using IIS8) link

I think its better to disable "Cache" of "Output Cache feature" by clicking the "Edit Feature Settings"

Ata Iravani

Posted 2009-10-30T10:52:57.583

Reputation: 101

Welcome to Super User! Generally we like answers on the site to be able to stand on their own - Links are great, but if that link ever breaks the answer should have enough information to still be helpful. Please consider editing your answer to include more detail. See the FAQ for more info.

– slm – 2013-04-17T05:58:53.547

@slm thanks for your advise. I'll try to add more detail later – Ata Iravani – 2013-04-17T06:56:01.690