Friday, July 11, 2008

Java Web page Cache control

 

We can control the web page cache by using the following code at the top of the jsp page in java.

 

<%response.addHeader("Pragma", "No-cache");

response.addHeader("Cache-Control", "no-cache");

response.addDateHeader("Expires", -1);

%>

No comments: