LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » HTML-CSS-PHP-JavaScript / JavaScript Codes » How To Reload/Refresh The Web-Page With Pure JavaScript?

How To Reload/Refresh The Web-Page With Pure JavaScript?

How-To-Reload-Refresh-The-WebPage-With-Pure-JavaScript
There are several ways to reload the current page using a button or other trigger. The examples below use a button click to reload the page but you can use a text hyperlink or any trigger you like. The reload method in JavaScript is used to reload the webpage. The refresh button in your browser acts exactly like the reload method. If you call this method from anywhere in the web page, the web page will reload.

This code will create simple button with the text you want. When you click on the button, the JavaScript method will get executed by your browser and the entire page will reload.

Reload/Refresh The Web-Page With Pure JavaScript:

There are many way to reload or refresh your page on user demand via pure JavaScript but here we are sharing the best three of them that are simple and have the full features and also working in old browser.

Way 1:

<input type="button" value="Reload Page" onClick="window.location.reload()">

Way 2:

<input type="button" value="Reload Page" onClick="history.go(0)">

Way 3:

<input type="button" value="Reload Page" onClick="window.location.href=window.location.href">

Note: You user browser should must allow JavaScript as some users block JavaScript in there browser to browse faster then there it will not work.

Recommended For You:
How To Import CSV Files Using PHP To MySQL?

Last Words:

However, this need some div and java script knowledge you can protect your contents some how more encrypted box so any one can not easily steel. Be Blogger! Be Safer! Thank For Reading this guide.

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “How To Reload/Refresh The Web-Page With Pure JavaScript?”

  1. Anu Angel says:

    thanks for the nice information in the post

Leave a Reply

Your email address will not be published. Required fields are marked *