modify Cache-Control value as no-cache, no-store

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

modify Cache-Control value as no-cache, no-store

neha bhatt
Hi,

I am using struts 2.0.11 and I need to modify Cache-Control header value as no-cache and no-store
I use following code at jsp page
<%  
       response.setHeader("Pragma","no-cache");
        response.setHeader("Cache-Control","no-cache,no-store");
        response.addHeader("Cache-Control","pre-check=0,post-check=0");
        response.setDateHeader("Expires", -1);
 %>

but I cannot get any Header parameter at very first time submission.
and next time after refreshing page I get  --

cache-control: max-age=0

instead I need 'no-chache, no-store'

Please help me..