HTMLisEasy.com
HTML tutorials for the rest of us...
Meta Tag Primer - part 3

meta - http-equiv

First, a bit of background. When you click on a link, that sends a request for a file to a server. That request is made using a particular protocol (format) called HTTP (Hyper-Text Transfer Protocol). The server checks to see if it has the file, then sends back a block of information plus the file. That extra block of information is the "header" block. It can contain extra information for the browser. By using a http-equiv meta tag, you can sort of fake out the browser and make it believe it's getting extra information from the server. Only rather than from the server, it's coming from you in the form of a meta tag. There are a few http-equiv meta tags, but only one that is worth learning about...

 

http-equiv="refresh"

This refreshes (or reloads) the browser. It can reload with the same page, or with a different page. It can reload immediately, or after a time interval. The basic syntax is as follows...

<meta http-equiv="refresh" content="5;url=http://www.newsite.com/">

5 is the number of seconds to wait before refreshing, and http://www.newsite.com/ is the new URL. This can be a full or relative URL.

What's a full or relative URL?

A URL (Uniform Resource Locator) is the address of a file on the WWW. A full URL is the complete address such as:
https://www.htmliseasy.com/table_tutor/lesson01.html

A partial, or relative URL is the address relative to another page in the same domain. For example:
lesson01.html
or
table_tutor/lesson01.html
or
../table_tutor/lesson01.html

If this is still confusing to you, you need to go back and get some remedial HTML lessons.

Here is a working example that will sling you through a few pages automatically, then bring you back here.

>>> GO >>>

Pretty cool, don't you think? If you move one of your pages and would like to automatically redirect your visitor to the new page, this is one way to do it.


There are other http-equiv meta tags that you might hear about... expires, pragma, window-target, etc. We'll skip these for a very good reason... they don't work! Or, at best, they'll only work for a very small portion of your visitors. They're not worth bothering with... trust me.

There are other NAME type meta tags, such as author, copyright, generator, etc, etc, but those aren't really of any use to you either. In addition, you can make up meta tags for your own use...

<meta name="Daniel_Boone" content="King of the wild frontier.">

The meta tags we've gone over have a solid use, and they work nearly universally. Unless you have a specific need, there is no reason to spend time messing with all the various other meta tags.

Develop your description and keywords tags, use the robots meta tag only where absolutely necessary (you should really just let the robots do their thing) and use the http-equiv="refresh" meta tag if you want to re-direct visitors.

Again, don't get too crazy with your description and keyword list. Different search engines use different criteria, but one thing is almost universally assured... abuse the keyword and description meta tags and you'll likely be penalized.


I said earlier that we would touch on strategies for improving your web site's ranking in search engines. Over the years I've noticed a few basic principles that you should keep in mind when putting together your pages...


And that ladies and gentlemen, is all I have to say about META tags ;-)

<< BACK