[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

IIS or browser caching ASP pages, but not HTML

Posted on 2009-04-26
4
Medium Priority
?
416 Views
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:

http://localhost/VD/page.ext

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) ?
0
Comment
Question by:zorba111
  • 2
4 Comments
 
LVL 1

Expert Comment

by:captainGrebo
ID: 24236282
Try  holding down the CTRL key and pressing F5 - This reloads the page rather than looking for a cached version
0
 

Author Comment

by:zorba111
ID: 24237056
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 ?
0
 

Author Comment

by:zorba111
ID: 24237125
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)
0
 
LVL 31

Accepted Solution

by:
James Murrell earned 1500 total points
ID: 24239471
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:              

<%=DateTime.Now%>
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 http://learn.iis.net/page.aspx/154/iis-7-output-caching/
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
A phishing scam that claims a recipient’s credit card details have been “suspended” is the latest trend in spoof emails.
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.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
Suggested Courses

872 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