IIS Caching

Ever got a call saying that it looks like the ASP pages are being cached well here will be why.

IIS 4.0 Caching

ISAPI applications (Active Server Pages Web pages) can be cached on Internet Information Server. When you create a new IIS 4 application, caching of ISAPI Applications is on by default. Use these steps to disable caching:

1. Open the Microsoft Management Console (Inetmgr.exe).
2. Browse the Internet Information Server tree until you reach your
application.
3. Right-click your application, and select Properties.
4. Click the Directory tab, and then click the configuration button*.
5. Click the App Mappings Tab, and clear Cache ISAPI Applications.

* If the virtual directory is not an application, the configuration button will not be available. Click the Create button, and then the configure button will be available.

You have now prepared your IIS Application so that it won’t cache your ASP pages. But this alone is not enough. At the top of the .asp page that you do not want cached, add the following line: <% Response.Expires=0 %>
IIS 5/IIS 6 Caching

ISAPI applications (Active Server Pages Web pages) can be cached on Internet Information Server. When you create a new IIS 5 application, caching of ISAPI Applications is on by default. Use these steps to disable caching:

1. Open the Internet Information Services.
2. Browse the Internet Information Server tree until you reach your
domain.
3. Right-click your application, and select Properties.
4. Click the Home Directory tab, and then click the configuration button*.
5. Click the App Mappings Tab, and clear the Cache ISAPI Applications check mark.

* If the virtual directory is not an application, the configuration button will not be available. Click the Create button, and then the configure button will be available.

You have now prepared your IIS Application so that it won’t cache your ASP pages. But this alone is not enough. At the top of the .asp page that you do not want cached, add the following line: <% Response.Expires=0 %>

Link to the Microsoft info page.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;189409

 

Leave a Reply