Thursday, July 31, 2008

Web Page Redirection

<head>
<meta http-equiv="Refresh" content="5; URL=reform.html" />

The above code causes the browser to load the page "reform.html" 5 seconds after loading the page that contained the code. If the URL=page.html is omitted then the browser reloads the page containing the code every 5 seconds.
The above code also works with pages in framesets or iframes.
Pay special attention to the value of the attribute content . Examples:
content="5"> - reloads the page every 5 seconds
content="5; URL=reform.html"- loads the page reform.html after 5 seconds
In the second example the value of content is the number of seconds, a semi-colon, followed by URL=reform.html".

No comments: