tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Seth Ladd <s...@ehawaii.gov>
Subject Re: strange cache behavior in Tomcat 5.5.9?
Date Mon, 01 Aug 2005 18:15:34 GMT
Gabriel Belingueres wrote:
> Hi,
> In my JSP pages I put the following tags to avoid the browser cache the pages.
> 
> <head>
> <meta http-equiv="Expires" content="0" />
> <meta http-equiv="Pragma" content="no-cache" />
> <meta http-equiv="Cache-Control" content="no-cache" />

I wouldn't trust this way.  I would always use the below method for 
manipulating any cache control or general HTTP headers.


> <%
> response.setHeader("Cache-Control","no-store");
> response.setHeader("Pragma","no-cache");
> response.setDateHeader ("Expires", 0);
> %>

This is the way to do it.  Also, it's backwares compatible.  This sends 
actual HTTP headers back to the client in the response.

Seth

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message