In order to accelerate users' browsing speed, browsers Usually retrieve browsed web pages to the hard drive. The next time they browse the same page, they will go to the hard drive to find them. However, the current web pages are dynamic, to prevent users from capturing expired data in the hard drive, JSP can use the following method to prevent the browser from caching the webpage. This method ensures that the user can always see the latest data on this webpage.
1. JSP syntax
<%
Response. setHeader ("Pragma", "no-cache ");
Response. setHeader ("Cache-Control", "no-cache ");
Response. setDateHeader ("Expires", 0 );
%>
2. You can also use the following HTML syntax to use static Web pages.
<Meta http-equiv = "Pragma" content = "no-cache">
<Meta http-equiv = "Cache-Control" content = "no-cache">
<Meta http-equiv = "Expires" content = "0">
Note: These HTML syntax should be placed in the