May 03, 2012 02:49 PM|Ruchira|LINK
After user views and possibly interacts with a page using client script, a refresh or "back button" click causes the page to be re-rendered as it was initially.
That's not true. When you press the back button, the browser takes the page from cache. It does not send a request to the server unless you have explicitly set no cache for the page. But when you press refresh, it sends a request to the server and gets new
data. So there is a big difference between browser back button and refresh button
Is there a way to detect and reject such a refresh or back button action?
What you can do is, detect the keystrokes such as F5 and R then disable those keys. But I do not recommend this. Why do you need to disable those? If user cannot refreh a particualr page, he simply reload the same page again by entering
the URL. So it's actually pointless to disable the refresh ability. It's never been a good user experience too. If user refresh the page, that means either the page does not load correctly or s/he needs new data to be displayed. Do not disable those feautures.
My Tech blog | My YouTube Channel