|
Every time you refresh the page the end of this sentence
To refresh this page click the refresh button
This javascript refresh page reloads your web page. The javascript refresh
page can be used on form elements like buttons, attached to custom graphics
or used in a normal hyperlink e.g. refresh page.
The refresh page javascript is useful when you wish to refresh
a web page to illustrate changes that happen to the page when it is
reloaded. I use the javascript
attached to a button on the text
randomizer page. This javascript saves your
visitor having to use the browser refresh button or press the keyboard equivalent (F5).
Refresh a web page without javascript
Some people feel that using javascript to refresh a page can be unreliable, since not everyone
has javascript enabled. If you decide that the refresh page javascript will not suit your purposes you can consider the meta refresh tag.
The meta refresh tag can be used to refresh a page after a specified period of time. Note this tag can not be used in conjunction with text, buttons or graphics.
An example of a meta refresh tag is shown below.
<meta http-equiv="refresh" content="2;url=http://x-lab.co.uk/experiment/js_page_reload.html">
Since this particular page deals with how javascript can be used to refresh a web page, to save confusion with the meta refresh tag, I will not go into further depth.
You can search the web for "Meta Refresh Tag" for more information, if you do require a non javascript method of refreshing a web page.
Javascript Refresh Page
|