Turning off browser caching doesn't work


Web tier: servlets, JSP, Web frameworks: Turning off browser caching doesn't work

  1. Turning off browser caching doesn't work (5 messages)


    I need to turn off browser caching for a couple of pages in my web-application. First I tried to do this with setting the headers:

    response.setHeader("pragma", "no-cache");
    response.setHeader("cache-control", "no");
    response.setHeader("expires", "0");

    I am testing the application in IE 6.0. It doesn't work. I also tried to add meta tags:

    <META http-equiv="Content-Style-Type" content="text/css">
    <META Http-Equiv="Pragma" Content="no-cache">
    <META Http-Equiv="Cache-Control" Content="no-cache">
    <META Http-Equiv="Expires" Content="0">

    Meta tags don't work as well. I found an article about a bug in IE regarding truning off caching. The author suggested to add meta tags to the end of the HTML file as well and did this:

    <META Http-Equiv="Pragma" Content="no-cache">
    <META Http-Equiv="Expires" Content="0">

    Still it doesn't work.

    Did someone managed to turn off caching in IE?


  2. Just out of curiosity, are you going through a proxy server?

  3. Chuck,

    I am running the application on JBOSS using IE as a client. So far the testing was only on the same machine (client and server). No proxy servers.

    It is difficult to believe that it is impossible to turn off caching. I am sure there should be a way.

  4. Turning off browser caching doesn't work[ Go to top ]

    How big are your pages? I remember a while back reading something about IE having issues with large pages and caching that if the page was big that it would ignore the meta tags at the top of the page. In a MSDN article they suggested putting them at the bottom of the page as well.
  5. Turning off browser caching doesn't work[ Go to top ]

    Here is one that we used on a previous project:
    <META http-equiv="must-revalidate">

    From a tech doc:

    Many users have reported that Microsoft's Internet Explorer refuses the META tag instructions, and caches the files anyway. So far, nobody has been able to supply a fix to this "bug." As of the release of MSIE 4.01, this problem still existed.

    Like I stated in my earlier post we also found that putting the meta tags at the top and bottom of the page seemed to work.
  6. well I had a similar caching problem while accesing
    realtime data through proxy server .

    tried using all the meta tags & stuff .. but in vain.

    finally appended a a random string to the url each time
    so that a new url is presented to the proxy everytime & there fore get a new page & not a cached one ...

    well my problem was solved & i was able to get real time data..