Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reload page using prototype

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

like image 525
xain Avatar asked Dec 02 '22 05:12

xain


2 Answers

You shouldn't need a Javascript Library for this. A simple:

window.location.reload();

or

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

should suffice.

like image 83
Justin Niessner Avatar answered Dec 22 '22 20:12

Justin Niessner


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

like image 30
Quentin Avatar answered Dec 22 '22 20:12

Quentin