How can you prevent the Browser from Caching data of the Pages you visit

By setting properties that prevent caching in your JSP Page.They are:

 

<%

response.setHeader(“pragma”,”no-cache”);//HTTP 1.1

response.setHeader(“Cache-Control”,”no-cache”);

response.setHeader(“Cache-Control”,”no-store”);

response.addDateHeader(“Expires”, -1);

response.setDateHeader(“max-age”, 0);

//response.setIntHeader(“Expires”, -1);//prevents caching at the proxy server

response.addHeader(“cache-Control”, “private”);

%>