banner
Welcome to HTML.co.uk, the number one resource for all news, information, and happenings regarding HTML.

Updates: HTML.co.uk has just been relaunched. Subscribe to our RSS Feed to stay on top of HTML news and techniques.
May
12th

Meta Elements Part 5: Forwarding, PICS, and more

Author: Editor | Files under HTML Tutorials
Tags for this article: , ,

This element has become quite commonplace, which is why we are also describing it here in out tutorial. Automatic forwarding of this type is often criticized based on the argument the destination site is unreachable for some visitors. Most browsers support such forwarding, however, depending on the settings, some might ignore it. Likewise, many search engine robots do not follow the forwards either. Another problematic area is the amount of time the web surfer must wait before being forwarded to another site. If the site contains another explanatory instruction along with the forwarding, then the user requires a certain amount of time before they will be forwarded. In many instances without such additional instructions, the waiting time is set to zero, so that the forwarding occurs immediately. This is especially problematic, if the visitor tries to use the back button, as they will still only be catapulted forward. Then the user is stuck at the website.

In practice, automatic forwarding is often used to direct a visitor from the old site of a web project, to the new site. However, in most cases it is more advantageous to use a “real” forwarding with HTTP status codes, although this is only possible with server side technology.

An Example:

<head>
<meta http-equiv= “refresh” content= “5; URL=http://www.html.co.uk/”>
</head>

Explanation:

With <meta http-equiv= “refresh” content= “…”>, you prompt the forwarding to another address. With content= “5, you determine in how many seconds the forwarding should start. So the 5 in the example means that the current site, after it has been loaded, will be displayed for 5 seconds. Afterwards the web surfer is directed to the URL entered in url=…”. Write the entire element, including the somewhat unusual placing of the quotation marks, just like it is written in the example above. Enter your desired display time and forwarding address. With local addresses on the same server you can write absolute or relative paths without entering http:// and the domain. The file name alone suffices for forwarding to files in the same directory. With a waiting time of 0, the forward destination website will be loaded immediately.

Take Note:

Do not assume that these elements will always work. If you have forwarded to a new address, it is best to also include a link on the original site to the new address. That way, users, for whom Meta elements do not work, will also find their way to the new site. Also be sure not to enter a waiting time that is too short. Finally, forwarding via HTTP, instead of using these meta tags, is essentially the optimal method.

Elements for PICS

PICS stands for “Platform for Internet Content Selection”. It concerns a standardised method of describing internet content. The formula exists in order to distinguish adult internet content from the rest. There are so-called PICS labels for this purpose. Web site developers can either voluntarily use PICS labels, or – and this is the more reasonable alternative – they settle on a PICS service that distributes PICS certificates for content.

We will not go into details regarding PICS systems. For more information you may visit the W3 consortium’s page on PICS. Modern browsers can recognise PICS content. Certain software side settings can be undertaken in order to allow the browsers to do so, by parents wishing to oversee their children’s internet surfing, for example. By comparing the PICS label of a site to the current configuration, the browser can then decide whether or not to display a certain site.

An example:

<head>
<meta http-equiv= “PICS-label” content= ‘ (PICS-1.1 “http://www.gcf.org/v2.5″
labels on “2004.14.05T08:15-0500″
until “2005.12.04T23:59-0000″
for “http://w3.org/PICS/Overview.html”
ratings (suds 0.5 density 0 color/hue 1))’>
</head>

Explanation:

Through the meta element http-equiv= “PICS-Label”, you can write a PICS label for a HTML file. The PICS label follows after content. The entire label is placed inside simple quotation marks. The syntax of the PICS label is then included with the parenthesis. Then the necessary information detailing the PICS version and the URI, where the content categorisation is defined, is included therein. The elements on, until and for are all optional. The ratings element is definitely critical, in which the actual content categorisation is written. The categorisation is then again surrounded by parenthesis. The PCS service, that distributes the PICS certificates, must determine what information is entered for the categorisation inside the parenthesis.

Diverse Meta elements

The following Meta elements are various collector pieces. They are often elements, which function with certain web servers or browsers, or are incorporated with editing software. Sometimes they are only the inventions of people who believe their HTML files possess magical powers. Here is a small selection of such meta elements.

<meta name= “generator” content= “MS FrontPage 2000”>
<meta name= “generator” content= “Netscape Composer”>
This element is included by HTML editors, especially WYSIWYG editors, without the knowledge of the author. That way software manufacturers can easily search the web and determine who is using their software.

<meta http-equiv= “set-cookie” content= “cookiename=cookievalue; expires=Sun, 01 Jan 2008 00:00:00 GMT; path=/;”>
Let’s you set cookies.

<meta http-equiv= “cache-control” content= “no-cache”>
Instructions for the browser not to use a cache, but instead load from the original site.

<meta http-equiv= “pragma” content= “no-cache”>
Instructions to the proxy agents not to save the file on a proxy server.

Post a Comment