| Automatically load a web pages |
How can I automatically load another page or reload the same page?
You can do this by using Client-Pull or JavaScript.
Here are the instructions for Client-Pull method using <META>:
-
Use <META> in the <HEAD> section of your document.
-
Write HTTP-EQUIV and CONTENT in <META> to accomplish client-pull.
Examples
To reload the document itself:
<HEAD> <META HTTP-EQUIV=REFRESH CONTENT=5> </HEAD>
CONTENT=5 means wait for 5 seconds to reload the page.
To load visitors to another page:
<HEAD> <META HTTP-EQUIV=REFRESH CONTENT="5;URL=http://www.dotspecialist.com/tips_tricks/"> </HEAD>
URL=http://...... This is the URL of the page you want to load a visitor to.
That's it. Is it easy? Remember that HTTP-EQUIV will work in some browsers such as Netscape 2.0 and Internet Explorer 3.0 or higher. So, don't forget to make an alternative for visitors who are using old browsers.
Another alternative is using JavaScript.
<html> <head> <title>Auto Reload</title> <script language="JavaScript"> <!-- var time = null function move() { window.location = 'http://yoursite.com' } //--> </script> </head> <body onload="timer=setTimeout('move()',3000)"> <p>see this page refresh itself in 3 secs. </body>
Above is an example of JavaScript that will reload a page in 3 seconds. See timer=setTimeout('move()',3000), 3000 is number of milliseconds which equals to 3 seconds. If you want to load visitors to another page, change the URL, window.location = 'http://yoursite.com', to your destination. |
| Return to Listing |