0

In my app IE caches whole content. It seems like *nocache.js is not working? When I jump from one tab to another it cashes everything. Even that I put meta tags for not caching the behavior is the same:

            <meta http-equiv="Cache-Control" content="no-cache" />
            <meta http-equiv="Pragma" content="no-cache" />
            <meta http-equiv="Expires" content="0" />

The manual turn off of caching from Tools -> Internet Options -> Browsing history ... is not proper solution in my case.

My index.html file look like this:

            <!DOCTYPE html>
           <html>
           <head>
           <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
           <meta http-equiv="X-UA-Compatible" content="IE=edge" />
          <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
           <META HTTP-EQUIV="Expires" CONTENT="-1">
          <script language="javascript" src="myapp/myapp.nocache.js"></script>
          </head>
          <body>
         <iframe src="javascript:''" id="__gwt_someFrame" tabIndex='-1' style="position: absolute; width: 0; height: 0; border: 0"></iframe>
        </body>
          </html>

Thanks for help!

EDIT: Thanks for help, but still problem exist. The method table.setVisibleRangeAndClearData(table.getVisibleRange(), true); is not working under IE. I see only the endless spinner and table content is not loading properly.

Issue has been resolved: When I have changed Range every time in setVisibleRangeAndClearData(table.getVisibleRange(), true); the page is loading every time from server. It seems that under IE RangeChange Event is not firing properly (at least in my case)

user2739823
  • 397
  • 1
  • 7
  • 24

2 Answers2

0

I read that because of a bug in IE, those lines may need to be nearer the end of an html file. http://www.htmlgoodies.com/beyond/reference/article.php/3472881

Also, it's advised to use -1 in place of 0 for the expires value. HTTP Expires header values "0" and "-1"

Let me know how those work for you.

Community
  • 1
  • 1
britter
  • 141
  • 2
  • 11
  • Hmm, that stinks. Have you tried the solution posted on this question? http://stackoverflow.com/questions/1341089/using-meta-tags-to-turn-off-caching-in-all-browsers – britter Jun 16 '14 at 14:39
  • Yes, and still without luck :( – user2739823 Jun 16 '14 at 14:44
  • One other thing I've seen in several examples is to add a parameter that doesn't really mean anything to src entry in the script tag, like ?ver=1.0.1. That is supposed to force reload, bu tI haven't tried it. And it means tweaking everytime you do a release. – britter Jun 16 '14 at 15:20
  • If you are just dealing with testing right now, CTRL + F5 will clear the cache reload the page so your code/css is up to date. – britter Jun 16 '14 at 15:22
0

If nothing is working for you even after trying all the possible solutions then try with a trick that works in all the cases.

If the URL of the page is changed then browser considers it as a separate request and fetches a fresh copy of the page form the server. Simply append a dummy value in the URL if there is no concern from client side as query string for e.g UUID or time in milliseconds to make a new request.

Braj
  • 46,415
  • 5
  • 60
  • 76