Article

Practical Web Design - Top 15 META Tag Tricks

Page: 1 2 3 4 Next

Other META Tag Usage

Here's some other META tags for you to use if you see a need:

META Author

Identifies the author of the page.

<META NAME="Author" CONTENT="Michael Tuck">

META Date

Identifies the date the page was created.

<META NAME="Date" CONTENT="November 17, 2002">

META Copyright

Sets the copyright date of the page.

<META NAME="Copyright" CONTENT="2000-2003 SitePoint,    
Inc. All rights reserved.">

Expiration

If you want to have your page "expire," here's how to set it:

<META HTTP-EQUIV="expires" CONTENT=  
"thu, 31 DEC 2002 00:04:00 EST">

What this means in the real world is that your visitors' browsers will use the cached version of your page, if available, until the specified date and time are reached, at which time the page will reload from the server the next time it's visited. To force your visitors' browsers to reload your page from the server (i.e. always use the most recent content) on every visit, use the following:

<META HTTP-EQUIV="expires" CONTENT="0">

META Cache-Control

This tag keeps your page from being automatically cached by servers or browsers. AOL, for example, usually stores cached pages on its servers, which means that AOL users may view cached (i.e. old) copies of pages without being able to see the updated versions. Although caching pages speeds loading times, if your page is updated frequently, I suggest you use the no-cache tag to make sure your visitors always get the most recent version of your page:

<META HTTP-EQUIV="Cache-Control" CONTENT ="no-cache">

The following tag works specifically on Netscape browsers:

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

META Content-Type

This specifies the character content of the page. While most plain-vanilla HTML pages don't need this, any page using XHTML requires it.

< META HTTP-EQUIV="Content-Type" CONTENT="text/html;    
charset=ISO-8859-1>

The above tag is fairly generic and can be used for most Web pages. There are plenty of other character encoding values available. ISO-8859-1 is the default value.

META Content-Style-Type

Specifies the default Cascading Style Sheet language. The tag below is a relatively generic example:

<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

META Robots

"Robots" are programs used by search engines to index your site's pages. Most sites are OK having all of their pages indexed separately; these sites can use the following tag:

<META NAME="robots" CONTENT="all">

But you have other options:

<META NAME="robots" CONTENT="noindex,nofollow">
(the page is not added to the search engine at all; another way to write this is <META NAME="robots" CONTENT="none">)
<META NAME="robots" CONTENT="noindex,follow">
(while the home page is not added to the search engine, the robot follows the links)
<META NAME="robots" CONTENT="index,nofollow">
(the home page only is indexed)
<META NAME="robots" CONTENT="index,follow>

The default is the last one: the "index,follow" CONTENT value. This has the search engine catalog the index (home) page and follow all links. If this is what you desire, there's no need to include any ROBOTS tag.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Sponsored Links