Atozed Forums
Get Back Button Click Event - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Get Back Button Click Event (/thread-1941.html)



Get Back Button Click Event - 41linea45 - 09-05-2020

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.


RE: Get Back Button Click Event - kudzu - 09-06-2020

Have you looked at the demos which show how to do this?


RE: Get Back Button Click Event - Alexandre Machado - 09-08-2020

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).


RE: Get Back Button Click Event - 41linea45 - 09-11-2020

Thank you for replies.