This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Back / Refresh button in browser  RSS feed

 
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I dont know where this post should belong to...

In my online bank account, i have seen that..

when i try to go back (using browsers back button ) / click refresh,

the application takes me the login page...and says that u have either

used the refresh/back buttons...and should relogin

But how is that the application is able to track these events..

I tried this in IE6 / opera 8 and got the same result.The site pages are in .jsp's.

Would be appreciable if anyone can provide some light...on this..

Regards
A Kumar
 
author
Sheriff
Posts: 23571
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer probably won't make much sense to you, since it requires a knowledge of HTML (or JSPs)... but...

Quite simply, it is not tracking your refresh or back buttons presses on your browser. It is using sessions (and/or cookies) to track the state of what you are trying to do. And hitting refresh or back is distrupting the session state -- which is why it is complaining and asking you to relogin.

Henry
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Henry...

Thank you for the reply...

I do think that i have a fair bit of an idea about the html and jsp..

So if you can elaborate the concept further....I would be happy ...and would try to understand the concept

Thank you...
[ January 31, 2006: Message edited by: A Kumar ]
 
Henry Wong
author
Sheriff
Posts: 23571
138
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The webpage is either using url rewriting or cookies to maintain a session -- it is basically an id that was created for you on the server side.

This id was created when you logged in, and probably points to a state of the session. So when you make a request, the session, the html request, and everything else (post or get) is sent to the server. If the webpage, and data of your request, is for some session, whose state is supposed to be someelse, it won't work.

Since there should be no way for you to get the state out of sync with the links, it merely assumes that you press back or refresh.


Personally, I think it is just bad programming. Web apps should be written to withstand some amount of back, and definitely refresh.

Henry
 
Author and ninkuma
Marshal
Posts: 66789
168
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Servlets forum.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..

Thank you...guys...for the info..

Regards
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!