The difference between the page refresh methods commonly used in daily work:
1 window.location.reload (FALSE);
First say Window.location.reload (false); when we window.location.reload (); default is false;
It first determines whether the file changes when the file is requested, based on the value of the header if-modified-since of the browser's HTTP request, and if not, updates to the page are found from the cache.
If a form is present, the form form is resubmitted
2 Window.location.reload (TRUE);
This is different from false, regardless of the document's modification time, or there is no cache, it will be new on the server side of the request to update to the page.
If a form is present, the form form is resubmitted
3 history. Go (0)
First of all, History,history is your access to the page and routing records, it will be updated in real-time to the history, when you History.go (XX), according to the recorded route matching the corresponding and cached pages, In other words, all history is called a page that has been cached.
4 Window.location.href = Window.location.href
The equivalent of requesting a URL again.
If there is a form, the form data will not be submitted
Finally, the top left corner of the browser returns the arrow button
Its function is to return to the previous page, but the data returned after the page is not updated, the document is not updated.
Note: Window.location.reload (), Window.location.reload (True), history. Go (0), the data will be updated, the document is updated or not has been explained above.
Window.location.reload (false); Window.location.reload (true); Go (0) differences