[SOLVED] "Are you sure you want to navigate away from the page" message??

_dawn_chorus_

Honorable
Aug 30, 2017
558
56
11,090
All I can find searching is coding sites about how to add or remove this. But what IS it?

Not quite verbatim it says "are you sure you want to navigate away from this page" and has two buttons "leave page" "stay on page".

I know I have got it on sketchy sites before and assumed it was some kind of malware trap but for a bit now I get it when closing my gmail tab.. not every time but some times.

What is the purpose of this message and why is it so inconsistent? Is it dangerous?
 
Solution
Are you using Firefox? Are you sure you want to navigate away from this page is not unusual. I get them in Firefox all the time if the browser thinks something is being left unfinished on the current page.

Seems normal to me.
All I can find searching is coding sites about how to add or remove this. But what IS it?

Not quite verbatim it says "are you sure you want to navigate away from this page" and has two buttons "leave page" "stay on page".

I know I have got it on sketchy sites before and assumed it was some kind of malware trap but for a bit now I get it when closing my gmail tab.. not every time but some times.

What is the purpose of this message and why is it so inconsistent? Is it dangerous?

The standard set of web form controls (radio, text boxes, check boxes) contain a dirty flag internally. When you interact with them the data gets marked as dirty letting the program know there have been "updates" to the form data. Some browsers (like firefox) will look at form data to see if it's dirty and warn you that your data changes have not been saved. Some more sketchy sites will intentionally institute mechanisms to keep you from leaving including such notifications.

No biggie.
 
  • Like
Reactions: _dawn_chorus_