File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reload

 
Anurag Saxena
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to force <href> tag to get jsp page from the server not from the cache? eg.,
<a href="LogoutVerification.jsp" target="rightframe"> <b>Logout</b>
every time you click logout hyperlink, it should go to server to grb the JSP page not from cache. How to do this?
Thanks
 
Mani Ram
Ranch Hand
Posts: 1140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the JSP, put the anti-cache code.
You have to set the anti-cache code in the response headers like this
response.setHeader("Cache-Control","max-age=0");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
The first line is used to for HTTP 1.1 protocol
the second line is used for HTTP 1.0.
The third line will prevent caching at the proxy servers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic