JavaScript is used to make the  web pages interactive. Using java script we can do many thing without need of the server side page refresh.

Here i write how we can reload or refresh the same page using the java script.
Some times it required to web developer to refresh the page using the java script when it called the ajax method or it any purpose of timer logic etc.

refresh page using javacript

Syntax to Refresh or Reloading a Webpage using java script

JavaScript use the reload method to reload the webpage.

location.reload ();

You can change the default cache reload by setting a forceGet parameter. This will cause the browser to reload the webpage by fetching the data from the server anew instead of using the cache. This can be accomplished by using the following code: 

location.reload (true);

Example – A Web Page Refresh 



Click on the Hyperlink to Reload the Page:

<button onclick=”javascript:location.reload(true)” type=”submit” value=”Refresh Page”></button>

<a href=”javascript:location.reload(true)”>Reload Page</a>

</body> </html>

Kalpesh Patel

Founder Of Nexus Software Group Leading IT solution and service provider and offering a full range of application development and I.T. consultancy services. Nexus Software Group Contributors In: post free ads online in India and post free ads online in USA