Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Back / Refresh button in browser

 
A Kumar
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
 
Henry Wong
author
Marshal
Pie
Posts: 21506
84
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
Marshal
Pie
Posts: 21506
84
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65226
95
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