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 83

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 83

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 83

Expert Comment

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

#Citrix #XenApp #Citrix Scout #Citrix Insight Services #Microsoft VMMAP #Microsoft ADEXPLORE #Microsoft RAMMAP #Microsoft TCPVIEW #Microsoft AUTORUNS #Microsoft PROCESS EXPLORER #Microsoft PROCESS MONITOR
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.

685 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