JSP timing jump to the specified page
自动
If there is such a demand, when you visit a jsp page, you want to jump to another page within a certain period of time . For example: after a system is successfully logged session
in, it is judged according to whether there is a user in the , and if it has been logged in, it will directly jump to the home page, which can be achieved in this way.
The way response
to .
5秒后自动跳转到指定网页:
<% response.setHeader("refresh", "5;URL=deal.jsp");%>
As shown below:
JSP periodically refreshes the page
Of course there are regular refreshes
5秒后定时刷新网页:
<% response.setHeader("refresh", "10");%>
JSP disable cache page
By default, the browser will cache the web page, which can improve the display speed of the web page, but for some websites with high security requirements, it is usually necessary to disable the cache.
<% response.setHeader("Cache-Control", "no-store");
response.setDateHeader("Expires", 0);%>
The above content learns the common usage of JSP built-in object response