3 JavaScript techniques to Reload a page

3 JavaScript techniques to Reload a page

Page reloading is one of the most frequent task we do while browsing web pages. We know, page reloading can be commonly done by using browser specific button or using some programming(JavaScript/PHP) techniques. Also there are many ways to reload the current page.

Today I’m going to share 3 JavaScript techniques to reload a webpage. So, following examples uses a button click to reload the page but you can also use them in text hyperlink or image hyperlink if you want.

Let’s get stared with example-

Reload Page with Button Examples:

<input value="Click Me" onclick="window.location.reload()" type="button"> 
<input value="Click Me" onclick="history.go(0)" type="button"> 
<input value="Click Me" onclick="window.location.href=window.location.href" type="button">

Reload Page with Hyperlink Examples:

<a href="#" onclick="window.location.reload()">Click Me</a> <a href="#" onclick="history.go(0)">Click Me</a> <a href="#" onclick="window.location.href=window.location.href">Click Me</a>

Enjoy!

Total 0 Votes
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Comment

Back To Top