• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logoff application

 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done the logoff application by adding the following line


but after I clicked on logoff button its is working fine and redirecting to home page, then after i click on the back button in the browser, the previous functionality is still working. what would I do to prevent the previous functionality? or else is there any chances to lock the previous page?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Logging off will do nothing to prevent pages from being served from cache. Be sure to use the techniques described in the JSP FAQ for preventing your pages from being cached.
 
Shaik Vali
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , this may be related to Cache memory
please try the following code in jsp pages

<% response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control","no-store"); //HTTP 1.1

%>
All the best
 
Simpson Kumar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi shaik,

do i need to put the above code in all JSPs? only login.jsp?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Keep such goo out of the JSP. Investigate the use of a filter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic