SQL PHP HTML ASP JavaScript articles and free scripts to download
 
 

Page refresh and redirect through meta tags

We can refresh a page at a particular interval by using Meta refresh tags within the head area of a page. User doesn't have any control over the refresh rate of the page. This is usually used where page content changes over time. A page showing the cricket score has to refresh itself to display the current score. So at a particular interval the page reloads by meta refresh tag and collects the fresh score from the server. Here is the basic command used to refresh a page.

<meta http-equiv="Refresh" content="15">


Here the page will refresh after every 15 seconds.

Redirecting using meta refresh tags
We can use the same technique of refresh to redirect the page to a new location or a URL. Here by changing the time we can control the duration for which the current page will stay or load before the redirection takes place to new URL. Here is the code.

<meta http-equiv="Refresh" content="15;URL=http://www.google.com">


Here the page will redirect to google.com after loading for 15 seconds.

This type of meta redirection is different than header redirection. In a header redirection browser does not load the source page so it has no effect on header information the browser already have.






Join Our Email List
Email:  
For Email Newsletters you can trust
List of HTML Tutorial
HTML Tags
HTML Calendar
Tags on web page
Web Design