Tuesday, September 23, 2008

HTML Redirect to new URL

This is very useful when we want redirect from one page/site to other page/site.
For example the following code written in home.html. Whenever you clicked on this home.html link, browser will take you to http://jp-javaprogrammer.blogspot.com

<html>
<head>
<meta equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta equiv="REFRESH" content="0; URL=http://jp-javaprogrammer.blogspot.com/">
<title>JP</title>
</head>
</html>


Here http-equiv="REFRESH" tag reload/redirect the page after the mentioned time in the content tag.
Content=0 means immediately redirect /load the page.

0 comments:

Post a Comment