What is the difference between window.location.href=window.location.href and window.location.reload() in JavaScript?
views:
792answers:
2
+3
A:
If you say window.location.reload(true) the browser will skip the cache and reload the page from the server. window.location.reload(false) will do the opposite.
Mic
2010-03-08 22:10:28
What is default?
Ismail
2010-09-22 09:28:39
+5
A:
If I remember correctly, window.location.reload() reloads the current page with POST data, while window.location.href=window.location.href does not include the POST data.
David Johnstone
2010-03-08 22:14:10
note that when you use window.location.reload() on a POST the browser will ask you if you want resend the data to reload the page
Wimmel
2010-05-01 15:27:05