0

I work in Ext JS. in Ext JS webdesktop application , when i click browser refresh button it reload and goes to login window. Because my first page is login. For this reason i need to stop this event or disable browser refresh button when this application launch. i can stop F5 but can't browser refresh button. So please some one help me for this issue. Thanks...

  • Best and **safe** way: http://stackoverflow.com/a/12381610/3896470 – saurav Feb 07 '16 at 13:03
  • It is impossible to reliably stop a user refreshing the page, so don't try to do that (which I think is the point of user3896470's comment, but not sure as it relates to the back button). – RobG Feb 07 '16 at 13:10

1 Answers1

2

No, wrong issue

You have to memorize the current View he is in. As far as i remember, Ext has mechanisms for that, otherwise you can still use a (session-)cooke.

and you don't have to start you application with the login-screen. It is just one view, and imo. the one you would want to use as few as possible.

So. on page load, check wether he is logged in, if no, show him the login-view, if yes check which view he was in and render it, otherwise send him to the start point.

this is basically the loop you have to send him through, on pageload, on refresh, onlogin, ...

Thomas
  • 3,513
  • 1
  • 13
  • 10