Specifically, in Javascript you can superficially push a navigated state into the location stack so that when the user presses the back button, it is now the inserted page instead of the “actual” one. Most FE devs consider this a dark pattern and refuse to implement it.
That said, it’s basically just the front end’s version of a redirect. Unfortunately it’s been used a lot especially by malware sites to basically jail people into their site.
No, it wouldn't be that. That can only prevent unload if it throws a native modal up (cousin of alert, confirm, prompt, etc).
I think what they must have done is push some URL to the history state, using the History API, to fuck with the back and forward buttons, enabling them to intercept when you navigate back, by having added an additional page in there, that you never visited, but that they can use to serve you this interstitial.
dclowd9901|3 years ago
That said, it’s basically just the front end’s version of a redirect. Unfortunately it’s been used a lot especially by malware sites to basically jail people into their site.
bscphil|3 years ago
How common is it for FE devs to refuse to implement features that their employers tell them to implement?
rvr_|3 years ago
graderjs|3 years ago
I think what they must have done is push some URL to the history state, using the History API, to fuck with the back and forward buttons, enabling them to intercept when you navigate back, by having added an additional page in there, that you never visited, but that they can use to serve you this interstitial.
Just my 2c
smhg|3 years ago
That's a very "bold" choice of 538 if you ask me.
kmonsen|3 years ago
fyzix|3 years ago
xwdv|3 years ago
MrPatan|3 years ago