Create a JavaScript Refresh Link

Written by David Walsh on December 19, 2007 · 2 Comments

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!

Comments

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

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

Be Heard

Tip: Wrap your code in <pre> tags or link to a GitHub Gist!

Use Code Editor
Older
PHP Shorthand If / Else Examples
Newer
Return Random Records in MySQL