This article describes the JSP implementation of masking browser cache method. Share to everyone for your reference, specific as follows:
Many times because the browser's buffer often causes the page not to load immediately, so that the data error, then in the JSP, set the following lines of code, each page open browser will be again read from the server data, to ensure that the data on the browser to see the latest.
By setting the response header, you can allow browsers and proxy servers to not cache pages.
Method One:
<%
Response.AddHeader ("Pragma", "No-cache");
Response.setheader ("Cache-control", "No-cache, No-store, must-revalidate");
Response.AddHeader ("Cache-control", "pre-check=0, post-check=0");
Response.setdateheader ("Expires", 0);
%>
Method Two:
<%@ taglib uri= "orataglib" prefix= "ora"%>
<ora:noCache/>
I hope this article will help you with JSP program design.