Force Cache Clear in ASP.NET

Posted on 2013-01-21
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 82

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 82

Accepted Solution

Dave Baldwin earned 500 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 :

Author Closing Comment

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

Expert Comment

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

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Citrix XenDesktop, Citrix Studio, Citrix Policies, Citrix XenApp
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.

762 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

16 Experts available now in Live!

Get 1:1 Help Now