I built a JSP inventory, but Im running into a problem with the sessions when I log out.
I used session.invalidate(); to terminate my session, but if I hit the back button on my browser it will return me to the inventory page.
Now if I just simply click any link, it will throw me back out to login (which is what its supposed to do when Im not logged in), but if I refresh the inventory page, it refreshes the session and allows me to do anything I want, just as if I had never logged out.
How can I get around this??? I tried messing with the session-timeout value in my Web.xml, but to no avail. Is there a way I can simply clear the history of the browser once I log off??
Thanks
Boki
-
sessions problem in JSP (1 messages)
- Posted by: Bojan Beran
- Posted on: March 21 2005 16:13 EST
Threaded Messages (1)
- clear browser history by Venkatesh Rajmendram on March 26 2005 13:36 EST
-
clear browser history[ Go to top ]
- Posted by: Venkatesh Rajmendram
- Posted on: March 26 2005 13:36 EST
- in response to Bojan Beran
Hi Bojan,
It is kind of tricky...you can use below to clear your browser histroy
<%
response.setHeader("Pragma","no-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires",-1);
response.setDateHeader("Last-Modified",0);
%>
- Venkatesh Rajmendram