Problem in clearing browser cache using httpheaders in jsp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nizha
    New Member
    • Aug 2007
    • 3

    #1

    Problem in clearing browser cache using httpheaders in jsp

    Hi,

    The browser cache is not getting clearing inspite of setting these headers..

    <%
    response.setHea der("Cache-Control","no-cache"); //HTTP 1.1
    response.setHea der("Pragma","n o-cache"); //HTTP 1.0
    response.setDat eHeader ("Expires",-1); //prevents caching at the proxy server
    %>

    tried using the HTML metatag even, doesnt seem to work..

    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store">
    <meta http-equiv="expires" content="0">

    The browser still shows the old version of file but not the new version..

    Can anyone pls help me out..
Working...