Friday, February 13, 2009

Automatic Redirection

Many a time we want the page to be automatically redirected to some another location. In order to achieve the same a single statement needs to be written in the header section of the page from where redirection is to be achieved. This is a meta tag. e.g. if we want the page xyz.htm to be redirected to abc.htm then we will write following code in the head segment of xyz.htm

<meta equiv="refresh" content="1; url=abc.htm">

This means that whenever a user tries to come to the page xyz.htm he will automatically land at abc.htm after 1 second.

Typical description of this statement is as follows :

<meta equiv="refresh" content="anyno; url=address.here">


Replace anyno in the above tag with any number and the page will be redirected after this much second has passed since the opening of this page.

Replace address.here with the destination address of redirection abc.htm in our case.

NOTE : Above statement should be written in between the head tag of the page.

0 responses:

Corprova | Saroj Hydraulics | AlphaNumeric | durgeshindia