aspose file tools*
The moose likes Servlets and the fly likes tracking  browser  back  button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "tracking  browser  back  button" Watch "tracking  browser  back  button" New topic
Author

tracking browser back button

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,


how to track the browser back button at the time of user click the back button. i saw the www.icicibank.com website...when ever you click the back button ..they take you some page(let it be logout.jsp) ..giving messsage that session expire... even if you click the back button it redirect to the same page(logout.jsp)


how can acheive this?.. please can anyone tell me the idea?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42286
    
  64
Have you taken a look at the HTML/JavaScript that's used on that site?


Ping & DNS - my free Android networking tools app
Vinod K Singh
Ranch Hand

Joined: Sep 30, 2008
Posts: 198
You can generate an unique key for each page and keep it in session, which can be validated with each request. This unique key will match only once for a page, if it does not match show the appropriate error message to the user. Also no-cache can be used for pages, so that browser does not cache them.


My Blog
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Thanks Vinod and ULF
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tracking browser back button