none
IE9 Cache Not Refreshing RRS feed

  • 问题

  • Our customers have been reporting that the release we sent to them is not refreshed for them unless they delete/clear the temporary internet files or force the browser to ‘Always refresh from server’.  Our application is always with the cached copy of JavaScript file. Browsing the JavaScript alone on the browser brings up the file-download box which includes all latest contents. However, after this step also, the problem still remains with the application pages and it loads cached copy of JavaScript.

    The issue does not get resolved after closing all the browser instance or restarting the server. The only way to fix is to delete/clear the temporary internet files or force the browser to ‘Always refresh from server’.

    Software Environment
    OS: Windows 7 with SP1
    Browser: IE 9  - Version: 9.0.8112.16421

    Current Code block:

    <script language="JavaScript" src="Include/PatientValidations.js" type="text/javascript"> </script>

    Workaround over Internet

    <script language="JavaScript" src="Include/PatientValidations.js?key=#some#unique#number#" type="text/javascript"> </script>

    But, we cannot add everytime unqiue numbers to all changed JS files as we have to release .ASPX pages also every time even code changes are there in JS files.

    Same problem is happening with Image files also and its practiclly not possible to add unique number to all changed images because of some are in CSS files and some are in ASPX pages.

    Is there any better way to address this problem without much code changes in every release?


    2012年3月22日 11:19

全部回复

  • Hi,

    It appears IE won't send request to server when user simply puts focus back in the address bar and hits Enter. I used to inform customers refresh the page by clicking the refresh button, hitting F5 or using a super refresh(holds Ctrl while refreshing).

    2012年3月26日 3:30
  • Sekhar, I have same problem. I've been having issues with website not refreshing content. I recently changed from using IE9 as my default web browser for testing, instead of IE8. I’ve noticed that IE9 seems very temperamental with regards reloading the files and seems to stick with the cached copy. This obviously results in latest changes not being displayed when customer look at the site live.

    It is not feasible for customers to ask for IE setting to be "check every time I visit this page option". The first question they are going to ask WHY, and I cannot give IE9 as a reason.

    Here are few links on internet and I see others out there are having same/similar problems, but no one has suggested proper solution.

    http://stackoverflow.com/questions/5977673/ie9-caching-dynamic-pages
    http://stackoverflow.com/questions/367786/prevent-caching-of-ajax-call
    http://social.technet.microsoft.com/Forums/en/ieitprocurrentver/thread/782983d7-31c8-4fe4-819a-388feea2a490
    http://forums.asp.net/t/1728141.aspx/1

    Microsoft... Please help

    Franconia - The problem is not with the browser - addressbar. Your suggestion does not apply here.

    2012年3月27日 16:31
  • This is not Microsoft issue.  Our solution is to add cache expiration header for js/css/image files (e.g. 24 hours).  This way, when you deliver a new release to the customer, the customer can at least get the latest version of js/css/image files after 24 hours.

    Another solution that we consider is to change the context path for each new release and append the version number at the end (e.g. /appName/V2). As it is impossible to tell the customer to switch the url for each new release, we'll do a redirect at server side (e.g. redirect /app to /appName/v2). This way, it looks transparent to the cusotmer. 

    2012年8月4日 11:26
  • Actually recently we encounter a very wierd issue, it only happened at very few machine occaisally. After the cache expiration, IE still reads from cache. Even after we tell the user to delete the temp file, the cilent browser is still using the old version (don't understand where the cache is).  It can only be solved to force to the browser to "always refresh from the server".   Is  there anyone who encounter simillar issues? Any thought?
    2012年8月4日 11:29