Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  8] [ 6]  / answers: 1 / hits: 48279  / 11 Years ago, sat, april 27, 2013, 12:00:00

In order to reload the page without fully reloading everything I'm using:



window.top.location=window.top.location;


However, this doesn't work for some reason when there is anchor text. It appears to do nothing in this case, but more likely it refreshes the anchor.



Any fix for this that will reload the page (as above) without reloading the cached images and scripts?


More From » javascript

 Answers
10

Try using location.reload(false).



As MDN says, the second parameter is a boolean indicating whether to bypass the cache or not. false keeps using the cache, as you wanted.


[#78587] Thursday, April 25, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
pierce

Total Points: 315
Total Questions: 103
Total Answers: 89

Location: Svalbard and Jan Mayen
Member since Mon, Jun 7, 2021
3 Years ago
;