Pages

Sunday, February 3, 2013

Prevent Page Caching in JSP

It is possible to keep the browser from caching a JSP page response. The following hints added to the response header seem to prevent most modern browsers from pulling pages out of cache when the same URL is "hit":


The same effect can be achieved by using meta tags in the HTML header:


The Cache-Control header was added in HTTP 1.1, while the other two were also present in HTTP 1.0.

No comments:

Post a Comment