META FAQ

  1. How can I redirect the user to another page ?
  2. How can I stop users seeing stale copies of my pages ?
  3. How can I stop people re-framing my pages ?
  4. How can I make my pages display nicely in search engines ?
  5. How can I get my pages near the top in search engines ?
  6. How can I stop my pages being indexed ?
  7. What's the difference between HTTP-EQUIV and NAME META tags ?

How can I redirect the user to another page ?

  1. With the Location HTTP header. Usually done in the server configuration or with a CGI script.
    Status: 302 Temporarily moved
    Location: http://some.org/new-URL.html
    
    or
    Status: 301 Permanently moved
    Location: http://some.org/new-URL.html
    
  2. With the Refresh META tag.

How can I stop users seeing stale copies of my pages ?

Ideally, you must generate proper HTTP headers, either using features of your server or using CGI scripts.

Example HTTP 1.1 headers

Cache-Control: must-revalidate
Cache-Control: max-age=3600
Cache-Control: no-cache
Example HTTP 1.0 headers
Expires: Tue, 08 Apr 1997 17:20:00 GMT
Expires: 0 
Pragma: no-cache
Note that dates in the Expires header must be given in the correct format, and that illegal values cause pages to be totally uncacheable, which is unlikely to be what you require (besides being antisocial). Generating an Expires header corresponding to the update interval of the page will give optimal results.

If it is not possible to set the HTTP header, the Expires META tag may be used. This will influence many browsers, but typically not proxy caches.

For Netscape Navigator 3.0, <meta http-equiv="Expires" content="0"> forces the browser to check the modification date each time the object is loaded from cache (if unchanged, the server returns status 304). This is equivalent to setting Navigator Option: Network-Preferences: Cache: Verify-Document= Every-Time.
<meta http-equiv="Pragma" content="no-cache;> causes the object not to be cached at all, chewing up bandwidth by forcing a full GET every time the object is referenced.

At this time, few browsers or proxy agents support HTTP/1.1 operations.

How can I stop people re-framing my pages ?

Try using the Window-target tag, which in some browser versions may force the page to a particular frame (usually the top).

How can I make my pages display nicely in search engines ?

Use the Description tag.

How can I get my pages near the top in search engines ?

Try using a keywords tag. Not all search engines support this, though. See e.g. How search engines work (Calafia).

How can I stop my pages being indexed ?

Use the Robots tag. This may not be supported by all robots and spiders; try to list your page in a /robots.txt file on your server.

What's the difference between HTTP-EQUIV and NAME META tags ?

HTTP-EQUIV tags are equivalent to HTTP headers. Some servers may actually generate HTTP headers from the HTML tags, as suggested by the HTML 3.2 specification. Therefore, do not invent new HTTP-EQUIV tags unless you understand the HTTP specification. Use NAME tags instead.

More Questions ?

Mail me any more questions (and preferably the answers !).

reFRAME