★★设置网页过期为什么没有用?★★通过jsp里面加入下面的meta标签,本来以为可以页面后退的时候,产生过期的错
★★设置网页过期为什么没有用?★★
通过jsp里面加入下面的meta标签,本来以为可以页面后退的时候,产生过期的错误
但是事实上没有起到任何作用,还是照常显示
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
下面是我的画面,用jquerymobile的例子.
从a.jsp进入到b.jsp,然后点浏览器的后退按钮,没有出现过期的错误
a.jsp:
- HTML code
<!DOCTYPE html> <html><head><meta charset="utf-8"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0"><title>Yahoo News</title><link href="../jquery-mobile/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css"/><script src="../jquery-mobile/jquery-1.5.min.js" type="text/javascript"></script><script src="../jquery-mobile/jquery.mobile-1.0a3.min.js" type="text/javascript"></script></head><body><!-- begin first page --><section id="page1" data-role="page"> <header data-role="header"><h1>jQuery Mobile</h1></header> <div data-role="content" class="content"> <p>First page!</p> <p><a href="#page2">Go to Second Page</a></p> </div> <footer data-role="footer"><h1>O'Reilly</h1></footer></section><!-- end first page--><!-- Begin second page --><section id="page2" data-role="page"> <header data-role="header"><h1>jQuery Mobile</h1></header> <div data-role="content" class="content"> <p>Second page!</p> <p><a href="#page3">Go to Third Page</a></p> </div> <foote data-role="footer"><h1>O'Reilly</h1></footer></section><!-- end second page --><!-- begin third page --><section id="page3" data-role="page"> <header data-role="header"><h1>jQuery Mobile</h1></header> <div data-role="content" class="content"> <p>Third page!</p> <p><a href="#page1">Go back to First Page</a></p> <p><a href="http://xxx.xxx.xxx.xxx:8080/jquerymobile/Example/b.jsp">★Go to external page!</a></p> </div> <footer data-role="footer"><h1>O'Reilly</h1></footer></section><!-- end third page --></body></html>
b.jsp:
- HTML code
<!DOCTYPE html> <html><head><meta charset="utf-8"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0"><title>External HTML</title><link href="../jquery-mobile/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css"/><script src="../jquery-mobile/jquery-1.5.min.js" type="text/javascript"></script><script src="../jquery-mobile/jquery.mobile-1.0a3.min.js" type="text/javascript"></script></head><body> <p>This content will be ignored.</p> <!-- Begin Page 4 --> <section id="page4" data-role="page"> <header data-role="header"><h1>jQuery Mobile</h1></header> <div class="content" data-role="content"> <p>External Page!</p> <p><a href="#page1">Go to First Page</a>.</p> </div> <footer data-role="footer"><h1>O'Reilly</h1></footer> </section> <!-- End Page 4--> <h3>This content will be ignored as well.</h3></body></html>
[解决办法]
<a 里面加rel="external"试试
