• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1154
  • Last Modified:

Force Cache Clear in ASP.NET

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
0
shart68
Asked:
shart68
  • 3
  • 2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
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.
0
 
shart68Author Commented:
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.
0
 
Dave BaldwinFixer of ProblemsCommented:
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
0
 
shart68Author Commented:
I really appreciate the help given.
0
 
Dave BaldwinFixer of ProblemsCommented:
Thanks for the points.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now