How can we refresh a page every 20 seconds wothout using javascript?

December 13th, 2007 | by Shubhabrata |

We can refresh the page with the help of meta refresh tag.

The meta tag belongs within the <head> of your HTML document. When used to refresh the current page, the syntax looks like this:

<meta http-equiv=”refresh” content=”20″>

This is the amount of time, in seconds, until the browser should reload the current page.

Redirecting to a New Page

While the reload option is useful, it is usually not what people want from the meta refresh tag. To redirect to a new page, the syntax is nearly the same:

<meta http-equiv=”refresh” content=”2;url=http://webdesign.about.com”>

The only difference is in the content attribute.

content=”2;url=http://webdesign.about.com”

The number is the time, in seconds, until the page should be redirected. Then, separated by a semi-colon (;) is the URL that should be loaded.

  1. 2 Responses to “How can we refresh a page every 20 seconds wothout using javascript?”

  2. By udham on Jul 11, 2008 | Reply

    hello dear,
    pls send me code refresh the image in the page.
    if i will the pres the F5 then see the image.
    pls give me code in javascript or html do work as F5 .

    UDHAM CHAUDHARY

  3. By admin on Jul 11, 2008 | Reply

    Just put the following line on the top of your html code. This will refresh your page in every 5 seconds. You can change the value accouding to your need.
    <meta http-equiv=’refresh’ content=’5′>

Post a Comment