Go Premium for a chance to win a PS4. Enter to Win


Force Cache Clear in ASP.NET

Posted on 2013-01-21
Medium Priority
Last Modified: 2013-01-21
I'm having and issue getting IE 9 to reload the dynamic server data being passed from an .xml file to my webpage. When I hit the F12 key, select Cache (for the developer task bar), and select "Always refresh from server", the updated server content is then applied. The only other way I've found that works is to close IE 9 and reopen. The webpage is an ASP file? Is there a way to make IE 9 refresh from the server every 10 mins automatically?

If more details are needed, I'm happy to provide. thanks
Question by:shart68
  • 3
  • 2
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38802646
No need for details, that's the way it works.  The two methods to keep the page fresh are #1 have the server send the headers that tell the browser not to 'cache' them (though this does slow things down) and #2 use AJAX to load your pages and and refresh them on a timer like Facebook does.

PS: You can not force the browser to clear it's caches.  You can only force a refresh like you're doing or wait until the content expires.

Author Comment

ID: 38802919
So if the information is coming from the .xml file, is that where I should put the header code at the top? or as far as the AJAX, do you by any chance have an example of what code looks like so I can see where it belongs "structure-wise" as I am completely new to this method?

please let me know if you need to see the code I am using.
LVL 84

Accepted Solution

Dave Baldwin earned 1500 total points
ID: 38803031
The header code is not part of the file, it is part of the HTTP header that the server sends.  Unless you control the server, you can't change it.  AJAX code is javascript in the <head> section that contacts the server, loads content from it, and places it in the body of the page where it is needed.  For details, you need to find the AJAX.NET code that matches your situation.  Here's the Microsoft Ajax Overview :  http://msdn.microsoft.com/en-us/library/bb398874%28v=vs.100%29.aspx

Author Closing Comment

ID: 38803257
I really appreciate the help given.
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38803511
Thanks for the points.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Citrix XenDesktop 7.6 Citrix Policies Audio
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

926 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