IIS or browser caching ASP pages, but not HTML

Posted on 2009-04-26
Last Modified: 2013-12-08
I'm going thru' a basic web-dev tutorial.

Using IIS on my local machine, connecting to the pages hosted in a virtual directory on IIS using IE, format:


For .htm pages, if I make an edit, go to browser, press F5, the new page gets loaded

BUT, for .asp pages, if I make an edit, go to browser, press F5, the old pages stays loaded.
I can verify this by doing "View Source" - none of my changes get loaded.

very frustrating - how do I configure IIS and/or my browser (IE7) so *.asp pages don't get cached like this (and for that matter *.aspx etc. as I will shortly be moving onto these) ?
Question by:zorba111
    LVL 1

    Expert Comment

    Try  holding down the CTRL key and pressing F5 - This reloads the page rather than looking for a cached version

    Author Comment

    F5 or Ctrl+F5 still doesn't cause the *.asp page to get reloaded

    however F5 is enough for *.aspx pages to get reloaded

    clearly there is some config setting somewhere telling the browser (or IIS) to cache *.asp pages
    how to undo this ?

    Author Comment

    The version of IIS I am running is v5.1

    Just  for laughs, I copied the files to our SBSServer, and configured them inside a virtual directory in IIS running on the server.

    Any changes I made to *.asp flies on the SBSServers were propagated fine. I'm not sure which version of IIS shipped with our SBS2003, but it looks to be a more uptodate one than 5.1

    seems like a problem with older version of IIS ?

    can I simply install a more recent version from the net ? (running XP pro)
    LVL 31

    Accepted Solution

    try reserve of this

    Caching Your Most Popular Pages
    In the example above, we put all files with the extension JPG into the output cache. This does not always work because sometimes you want to be more selective and only put a particular document into the output cache. Here is how you do this with your most frequently requested page, your default document:
    1.  Create a file called default.aspx in the %systemdrive%\inetpub\wwwroot\pictures directory and add the following code:              

    2.  Navigate to "Administrative Tools" and select "Internet Information Services (IIS) Manager".
    3.  Use the tree view on the left side to navigate to the "pictures" application.
    4.  Click "Content View" at the bottom of the page.
    5.  Select your default document, e.g. default.aspx page.
    6.  Click "Switch to feature view" in the "Actions" menu on the right. Every setting that you configure will now only be applied to the default document.
    7.  Open the "Output Caching Rules" setting.
    8.  Add ".aspx" as a file extension.
    9.  Select "kernel-mode caching" then we can select "At time intervals" and enable "Monitor cached files" and enter 00:00:30 as the time interval.
    10. Browse to http://localhost/pictures with "Internet Explorer". By constantly refreshing the page (press Ctrl+F5 to make sure it does not come from the Browser cache), you see that the time will not change for 30 seconds.#

    taken from

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    PRTG Network Monitor: Intuitive Network Monitoring

    Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

    Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
    Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
    Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
    This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now