Net-informations.com
SiteMap  | About    

How to reload the current page ?

As there are many ways to do this but the following is the appropriate way to reload the same document with JavaScript .

The Window.location read-only property returns a Location object with information about the current location of the document.

Its optional unique parameter is a Boolean , which, when this method receives a true value as argument, it will cause the page to always be reloaded from the server. If it is false or not specified, the browser may reload the page from its cache.

JavaScript window.location object can be used....

  1. to get current page address (URL)
  2. to redirect the browser to another page
  3. to reload the same page
window: in JavaScript represents an open window in a browser .

location: in JavaScript holds information about current URL .

The location object is like a fragment of the window object and is called up through the window.location property.

location object has three methods:

  1. assign(): used to load a new document.
  2. reload(): used to reload current document.
  3. replace(): used to replace current document with a new one.

JavaScript 1.0

JavaScript 1.1

JavaScript 1.2









net-informations.com (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.