META tags are a very useful part of web page development. META tags can identify the author, tell the browser when to reload the page, and tell the search engine where to find the page, or not to find the page at all.
A BASE specifies the base URL for the document. All relative links in the document are derived from this base URL.
If your directory has been mapped on the server to a different name, i.e., if http://facstaff.gpc.edu/~pjoseph/ was given an easier directory name of facstaff.gpc.edu/pamjoseph, I would need to specify in the document that all the documents are located in the ~pjoseph directory by putting a BASE tag in the HEAD of the document.
Here is an example:
Placement of META and BASE tagsMETA and BASE tags should always be placed in the head of the HTML document between the actual <HEAD> tags, before the <BODY> tag. This is very important with framed pages, as a lot of developers tend to forget to include them on individual framed pages. Remember, if you only use META tags on the frameset pages, you'll be missing a large number of potential hits. Always try make the words plural and use all derivatives where possible. The words found in this tag are generally more important than the words found in the body, but less important than keywords found in the <TITLE> tags.
Three important META tags to insert on your page are: Keyword, Description, and Author. The author tag is used internally to have a contact name related to the page for updating, problems, questions, etc.
Below is what the GPC Home page looks like using the <TITLE> and <META> tags:
<TITLE>Georgia Perimeter College</TITLE>
<META NAME="KEYWORDS" CONTENT="gpc, georgia perimeter college, georgia perimeter, perimeter college, de kalb college, dekalb, dekalb College, dekab college, associates degrees, degrees, associate degree atlanta, two year colleges, nurse, nursing, fire, fireman, interpreter training, dental hygiene, esl, english language, online courses, college online, AAS, AA">
<META NAME="DESCRIPTION" content="An Associate Degree-Granting College of the University System of Georgia. Five locations in the Metropolitan Atlanta Area.">
<META NAME="AUTHOR" content="Pamela Joseph, Pamela Joseph ">
Keyword and Description attributesChances are that if you manually code your Web pages, you’re aware of the "keywords" and "description" attributes. These allow the search engines to easily index your page using the keywords you specifically tell it, along with a description of the site that you yourself get to write. Couldn’t be simpler, right? You use the keywords attribute to tell the search engines which keywords to use, like this:
<META NAME ="keywords" CONTENT="life, universe, mankind, plants, relationships, the meaning of life, science">
By the way, don’t think you can spike the keywords by using the same word repeated over and over, as most search engines have refined their spiders to ignore such
spam. Using the META description attribute, you add your own description for your page:
<META NAME="description" CONTENT="This page is about the meaning of life, the universe, mankind and plants.">
Make sure that you use several of your keywords in your description. While you are at it, you may want to include the same description enclosed in comment tags, just for the spiders that do not look at META tags. To do that, just use the regular comment tags, like this:
<!--// This page is about the meaning of life, the universe, mankind and plants. //--!>
Disabling Searches**On the other hand, there are probably some of you who do not wish your pages to be indexed by the spiders at all. Worse yet, you may not have access to the robots.txt file. The robots META attribute was designed with this problem in mind.
<META NAME="robots" CONTENT="all | none | index | noindex | follow | nofollow">
The default for the robot attribute is "all". This would allow all of the files to be indexed. "None" would tell the spider not to index any files, and not to follow the hyperlinks on the page to other pages. "Index" indicates that this page may be indexed by the spider, while "follow" would mean that the spider is free to follow the links from this page to other pages. The inverse is also true, thus this META tag:
<META NAME="robots" CONTENT="noindex, nofollow">
would tell the spider not to index this page, and the links would not be followed. For more information about the robot attribute, visit the W3C’s robot paper.
**There is no guarantee that a page will not be indexed by other search engines. Some search engines may come in and index our site based on the title and/or contents of the pages. Don't think that the search engines will not find your site if you haven't actually submitted it. If anybody, anywhere, on any page puts in a link to your site, the web-crawling robots at various search engines can follow it and get to your page.
ExpiresThis tells the browser the date and time when the document will be considered "expired." If a user is using Netscape Navigator, a request for a document whose time has "expired" will initiate a new network request for the document. An illegal Expires date such as "0" is interpreted by the browser as "immediately." Dates must be in the RFC850 format, (GMT format):
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
PragmaThis is another way to control browser caching. To use this tag, the value must be "no-cache". When this is included in a document, it prevents Netscape Navigator from caching a page locally.
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
These two tags can be used as together as shown to keep your content current—but beware. Many users have reported that Microsoft’s Internet Explorer refuses the META tag instructions, and caches the files anyway. So far, nobody has been able to supply a fix to this "bug." As of the release of MSIE 4.01, this problem still existed.
Setting Access LevelThis sets the access for the page to a general audience, with no child restriction for browsers that restrict access to children.
Refresh / RedirectThis tag specifies the time in seconds before the Web browser reloads the document automatically. Alternatively, it can specify a different URL for the browser to load.
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.newurl.com">
Be sure to remember to place quotation marks around the entire CONTENT attribute’s value, or the page will not reload at all.
Set-CookieThis is one method of setting a "cookie" in the user’s Web browser. If you use an expiration date, the cookie is considered permanent and will be saved to disk (until it expires), otherwise it will be considered valid only for the current session and will be erased upon closing the Web browser.
<META HTTP-EQUIV="Set-Cookie" CONTENT="cookievalue=xxx;expires=Wednesday, 21-Oct-98 16:14:21 GMT; path=/">
Window-targetThis one specifies the "named window" of the current page, and can be used to prevent a page from appearing inside another framed page. Usually this means that the Web browser will force the page to go to the top frameset.
<META HTTP-EQUIV="Window-target" CONTENT="_top">
More META Tag Resources:WebDeveloper.com
Need More Help? Contact Webmaster: Pam Joseph
Authored by Pam Joseph with excerpts taken from WebDeveloper.com METATags Tutorial by Scott Clark at http://www.webdeveloper.com/html/html_metatags.html