Reload page using prototype

Is there a way to reload the page using the prototype (or redirect to itself)?

+4
source share
3 answers

You do not need a Javascript library for this. Plain:

window.location.reload(); 

or

 window.location.href = window.location.href; 

should be enough.

+14
source

I doubt. It seems rather pointless to write a helper function for something as simple as location.reload(true); when it really is not used very often.

+5
source
 window.location.href = window.location.href; 
+1
source

Source: https://habr.com/ru/post/1305768/


All Articles