Difference between revisions of "Redirect your page"

From SchoolsWiki
Jump to: navigation, search
 
Line 14: Line 14:
 
</pre>
 
</pre>
 
* The number "0" in this example may be replaced by another number to achieve a delay of that many seconds.
 
* The number "0" in this example may be replaced by another number to achieve a delay of that many seconds.
* Replace <i>h<nowiki>ttp://www.example.com/</nowiki></i> with the url of your choice i.e <i>h<nowiki>ttp://www.ncte.ie/</nowiki></i>
+
* Replace <i>h<nowiki>ttp://www.example.com/</nowiki></i> with the url of your choice i.e <i>h<nowiki>ttp://www.pdst.ie/</nowiki></i>
 
* This technique is usable by all web authors because the meta tag is contained inside the document itself.
 
* This technique is usable by all web authors because the meta tag is contained inside the document itself.

Latest revision as of 13:44, 27 March 2015

Netscape introduced a feature to refresh the displayed page after a certain amount of time. This method is often called meta refresh. It is possible to specify the URL of the new page, thus replacing one page after some time by another page:

A timeout of 0 seconds means an immediate redirect.

This is an example of a simple HTML document that uses this technique.

Create a page called index.html containing the following, as shown below.

<html>
  <head>
     <meta http-equiv="Refresh" content="0; url=http://www.example.com/" />
  </head>
  <body></body>
</html>
  • The number "0" in this example may be replaced by another number to achieve a delay of that many seconds.
  • Replace http://www.example.com/ with the url of your choice i.e http://www.pdst.ie/
  • This technique is usable by all web authors because the meta tag is contained inside the document itself.