News for hackers. Stuff that matters.
Re:Just Normal Web Things by undebuggable on Sunday August 06, 2023 @03:57AM (#37019857)
Watching DOM events on the document and disabling key events for the key code 116. One can still trigger document refresh by remapping F5 to other physical key in OS settings, or by clicking refresh button in browser toolbar.
Re:Just Normal Web Things by josephg on Sunday August 06, 2023 @04:21AM (#37019985)
Does that work? I’m surprised browsers allow websites to disable the default behaviour of F5.
Re:Just Normal Web Things by undebuggable on Sunday August 06, 2023 @05:25AM (#37020299)
Yes absolutely. It's possible to remap the entire keyboard at the website level.
Re:Just Normal Web Things by johnnyanmac on Sunday August 06, 2023 @05:54AM (#37020469)
That seems unnecessarily complex compared to watching for a request to the same webpage, intercepting, and dropping the request. I believe that is all the refresh function is doing.

Now ofc I wouldn't give any executives that idea. Don't mess with expected user functionality, that's like UX 101. if I see my navigation tampered with, I flag that site as spam.

Re:Just Normal Web Things by undebuggable on Sunday August 06, 2023 @06:13AM (#37020564)
Depends on one's determination and motives there are many ways to "disable refresh". One motive I imagine and don't approve is some want their website to feel like a mobile app, for whatever reason.
Re:Just Normal Web Things by ukuina on Sunday August 06, 2023 @09:56AM (#37021948)
I don't think you can drop a window refresh event in JS?