HTML redirect
This article demonstrates how to use HTML redirect to send your visitors to an other location automatically.
Tutorial info:
| Name: | HTML redirect |
| Total steps: | 1 |
| Category: | Basics |
| Date: | 2009-04-21 |
| Level: | Beginner |
| Product: | See complete product |
| Viewed: | 2823 |
Bookmark HTML redirect
Step 1 - Using HTML redirect
HTML redirect
It is a very common problem that you want to send (redirect) the visitors to an other web page. For example if you have new site and want that the visitors visiting your old site to be informed about the changes and of course automatically redirected to the new site.
Fortunately the solution is quite simple. You can use a HTML meta tag to redirect your visitors. The syntax is the following:
This code should be placed inside the head section of your HTML code.
The parameters:
The "http-equiv" parameter must be set to "refresh". This parameter tells to the browser the the content must be refreshed (updated).
The "content" parameter defines when to refresh the content. This time interval is in seconds. Besides this you can define your alternative url here. If the content has no url part then your page will be simply reloaded. However if you define an url location here then your browser will be load the url you specified after the time interval is over.
HTML redirect examples:
Reload the actual content in every 10 seconds:
Redirect your visitor immediately to an other web page.
Redirect your visitor after 3 seconds to an other web page.
A complete HTML redirect example with head and body section:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="refresh" content="3; url=http://www.htmlf1.com/" /> <title>HTML redirect example</title> </head> <h1>This page will be redirected in 3 seconds!</h1> </body> </html>
Tags: html redirect page, html redirect, html, redirect
| HTML redirect - Table of contents |
|---|
| Step 1 - Using HTML redirect |
