The META Tag's Auto-Refresh/Client-Pull Feature: The Mechanics

Two attributes of the META tag are required to utilize the auto-refresh/client-pull feature: HTTP-EQUIV and CONTENT. The HTTP-EQUIV attribute must be set equal to "refresh". The CONTENT attribute must be set equal to a value following this format: "secondsOfDelay; url=someURL"

Here is an example:

<meta http-equiv="refresh" content="10; url=" />

The value of the CONTENT attribute is broken into two segments, separated by a semi-colon and a space. The first segment is an integer representing the number of seconds of delay you want once the HTML page which contains the META tag has been loaded. The second segment is url= followed by the absolute or relative URL desired.

In the following example, I have indicated a 30 second delay, after which the web browser will advance to "myPage.html", which is in the same folder as the current page.


<meta http-equiv="refresh" content="30; url=./myPage.html" />

Note that there are NO additional quote marks WITHIN the value of the CONTENT attribute surrounding the actual URL; there are only quote marks encompassing the ENTIRE value of the CONTENT attribute, including the integer, semi-colon-space, and url= prefix. In other words, DON'T do this:

content="30; url="./myPage.html"

The above value for the CONTENT attribute would break the browser, since the value for the CONTENT attribute would end after url=. You can't use extra double-quote marks within the value of an HTML attribute. Again, only use double-quote marks around the ENTIRE value of the CONTENT attribute.

For those rare individuals who are still supporting Internet Explorer 3.0, the auto-refresh/client-pull feature of the META tag may only be used with ABSOLUTE URLs, not relative URLs. In other words, if you are supporting IE3, the URL of the next HTML page to be pulled from the server must begin with the "http://" prefix.


<meta http-equiv="refresh" content="30; url=" />

Again, all modern browsers support auto-refresh/client-pull with either absolute or relative URLs.

Main Menu