Skip to content

How to disable pressing F5 #3844

Answered by FabianLars
linesoft2 asked this question in Q&A
Apr 2, 2022 · 1 comments · 7 replies
Discussion options

You must be logged in to vote

Currently you need to overwrite the f5 event via addEventListener (including the event.preventDefault()).
Furthermore you probably would need to disable the contextmenu event too since the menu has a reload option.

If you need a context menu you'd have to create one with html/js, therefore i generally recommend making your app "reload-proof" for example by always caching relevant values.

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@dolev146
Comment options

@FabianLars
Comment options

@ddublon
Comment options

@FabianLars
Comment options

@dolev146
Comment options

Answer selected by linesoft2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants