See also Danish translation (done by others in their own site, with my permission)
TIP: Here's how to make your page automatically load another page after a given number of seconds. Now, do you really, really need to do this?
This message will self-destruct in 30 seconds!
Only kidding, but if I was using a "META refresh" tag on this page, it actually would. In spy movies, that's a pretty neat thing, but when you're trying to read a web page it could get annoying... that's why I don't really do it here!
You've probably seen web pages that automatically move the user on to another web page, sometimes repeatedly in slide-show fashion. Here's how to do it, but I'll also explain why it's probably a bad idea in most sites.
How To "META-Refresh"
Use this syntax, within the <HEAD> section of the document:
The contents of the "CONTENT" attribute consist of the number of seconds until the page load takes place, followed by a semicolon and a space, then "URL=" followed by the URL of the site to load. Note that the "URL=" part is within the "CONTENT=" parameter, not a separate parameter.
Since this is an
I should note, however, that the
Why Not To "META-Refresh"
OK, now you know how to do it. Now here's why you probably shouldn't:
Why To META-Refresh
OK, enough negativity; people say I'm too negative, and all I do is keep shooting down ideas rather than propose anything constructive. Killing a bad idea can be a productive thing if it saves everybody from the problems the bad stuff causes, but I will get a bit more positive here by listing a few places where the use of these "refresh" pages might be a useful thing:
And there are probably a few other possibilities. No feature of HTML, or anything else, is totally evil; there are always some good uses. But some "features" are misused more often than they are properly used, so you should think carefully before using them.
Even if you do have what seems like a good reason to use an automatic refresh, you may still have to get rid of it... I was in that situation a long time ago. I had used a refreshed page to get around a technical difficulty in a site I worked on for my employer, but when they made a new marketing deal with a major company which involved them linking to that page, somebody at that company objected to the refresh on the grounds that it made it difficult for anyone to return to the original site via the BACK button. (I did use a 2-second pause on the refresh to allow time to go back, as opposed to some other refreshed sites that have no pause and pre-empt the BACK button altogether, but that wasn't enough, since most users don't figure out what's happening quick enough to hit BACK again within this short time.) So I was forced to come up with an alternative, non-refreshed solution really quickly. Let this be a lesson; if you're doing a site that's anything other than your personal home page, you may have a client, boss, affiliate, or other person who will someday demand that you get rid of that annoying refresh right now. It's a lot easier for you to develop the site without a refresh from the start than it is for you to figure out how to do away with it once it's embedded in your site's basic structure!
If you do use a refresh in your pages, at least provide a regular link to the next page in addition to the automated refresh, for the benefit of those with non-refresh-supporting browsers and those who don't want to wait for the automatic refresh to kick in.
And Now For Something Even More Annoying...
This page was first created 16 Nov 1997, and was last modified 24 Mar 2012.