Posts: 2
Threads: 1
Joined: Sep 2020
Reputation:
0
Location: istanbul
Hello
How can i know when user press back button in web browser in Intraweb 15?
How should set Back button operations in server controller and forms?
Thanks for advance.
Posts: 1,136
Threads: 37
Joined: Mar 2018
Reputation:
30
Location: Limassol, Cyprus
Have you looked at the demos which show how to do this?
Posts: 2,250
Threads: 193
Joined: Mar 2018
Reputation:
86
Location: Auckland, New Zealand
09-08-2020, 01:39 AM
(This post was last modified: 09-08-2020, 01:41 AM by Alexandre Machado.)
In reality you just can't.
I'm about to write a blog post about back button, how to deal with this. There are several options but it is definitely dependent on how exactly your application is designed and what you expect.
In general, the back button was conceived to work with static web sites from the beginning of the internet: a bunch of inter-related HTML documents which can be freely navigated forward or backwards, just like an hypertext document.
SPA (Single Page Applications) don't deal with the back button well, but there are some ways to "live" with it.
Having said that: Google is in a crusade to make all existing code out there that tries to fool (or control) the back button useless (and Google openly admits it). Even if they need to break a few well established behaviors. They started doing it last year and, as you can see for yourself, code to prevent/detect back button click that has been working since 2010 stopped working with the latest versions of webkit browsers.
If you find some forum answer I wrote a few years ago regarding this subject, I always clearly mentioned that it was a cat and mouse game (JavaScript devs are the mice and Google and Mozilla are the cats).