Create a JavaScript Refresh Link

By  on  

Until the advent of AJAX, to view an updated version of a page, you'd have to refresh the page. A page refresh link still has its place today for website that update frequently but don't offer AJAX or META refresh capabilities.

The Code

Click here to refresh the page

There you have it! Using the history object allows a simple refresh!

Recent Features

  • By
    Vibration API

    Many of the new APIs provided to us by browser vendors are more targeted toward the mobile user than the desktop user.  One of those simple APIs the Vibration API.  The Vibration API allows developers to direct the device, using JavaScript, to vibrate in...

  • By
    An Interview with Eric Meyer

    Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it? At first blush, it was the simplicity of it as compared to the table-and-spacer...

Incredible Demos

Discussion

  1. Thanks. Very simple abd it works. (((HUGS)))

  2. Thanks. Very simple and it works. (((HUGS)))

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!