Posted By

octaviannitagmailcom on 02/18/13


Tagged

JSP servlet


Versions (?)

Refire a real HTTP request on the server...


 / Published in: Java
 

... instead of loading the page from browser's cache: instruct the browser not to cache the pages by adding the following headers to the response

See also: http://stackoverflow.com/questions/49547/making-sure-a-web-page-is-not-cached-across-all-browsers

  1. response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1
  2. response.setHeader("Pragma", "no-cache"); // HTTP 1.0
  3. response.setDateHeader("Expires", 0); // proxies

Report this snippet  

You need to login to post a comment.