the application is developed using routing concepts of angular2 and when I run npm start and after loading successfully and application open up in a browser, after opening the F5 and refresh button in a browser should be disabled.
Asked
Active
Viewed 3,534 times
2
-
1Not possible, as it should be. Why would you want that ? – Adrian Fâciu May 08 '18 at 11:36
-
Please explain the full problem, since you can't disable `F5` or the browser buttons. – Dwhitz May 08 '18 at 11:46
-
we already given a refresh button in the menu to refresh data, because of this reason we need to disable F5 or refresh button in a browser. – nikhil bukkitu May 09 '18 at 04:51
1 Answers
2
While there probably are possibilities to prevent a user refreshing or navigating from a page, I would strongly advise against using these kind of patterns.
Instead, try to preserve the users data if necessary (cookies, local storage, backend, ...).

Jens Habegger
- 5,266
- 41
- 57
-
F5 disable is working by adding the script in HTML, but still when is press refresh button on browser the page is loading, it should also be disabled. – nikhil bukkitu May 09 '18 at 10:24