filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ]

Creating META tags

How can I put <meta> tags into my Frontier web pages?

When Frontier builds a web page (everything between the opening <html> tags through to the opening <body> tag), it calls a special script that handles <meta> tags.

The script is called metaTags, and is located at html.data.standardMacros.metaTags.

How the metaTags script works

You almost never call the metaTags directly--it gets called by scripts that build the top part of the page. So to get it to do your bidding, you send it messages--via directives.

A directive, as you recall, is a line in a website object, that begins with a pound sign (#). To control the metaTags script, you need to use directives that begin with #meta.

The name's the thing

Frontier processes your #meta directives based on their name. There are three kinds of names:

  1. The plain #meta directive
  2. The #metaSomething directive
  3. The #metaEquivSomething directive

The plain #meta directive

The simplest way to add something to inside the <HEAD> tags of your page is to define a #meta directive. This can be a string or wp text object, or outline--doesn't matter. Whatever is in that object goes into the <HEAD> of the page, exactly as you typed it.

The image above shows a plain #meta directive, which is in a wptext object. Remember, this can be a string or outline in your website table, or just a #directive at the top of a page, as shown below...

Whoops. I'm getting ahead of myself. Notice that the example above shows the directive #metaTopic! What is that? Well, it's the #metaSomething format. Before we go further, check out the source for this page to see it in action, and see if you can guess how it works.

#metaSomething

When Frontier sees a directive that begins with 'meta' and is followed by something in the name, it builds a meta tag that looks like this:

<meta name="something" content="the value of metaSomething">

#metaEquivSomething

There's another kind of meta tag: Instead of a name/content attribute pair, it has a http-equiv/content attribute pair.

Using the http-equiv/content attribute pair is really powerful. It allows us to mimic real HTTP commands from a server--and force the browser to do some interesting things.

Probably the most common use of http-equiv is to force a page to refresh--or load another page after a short period of time.

Consider this example:

#metaEquivRefresh "n;URL=the URL"

results in:

<meta HTTP-EQUIV="Refresh" CONTENT="n;URL=the URL">

where n is the number of seconds before the URL loads into the browser.

Another common use of http-Equiv is Pragma. It prevents a page from being cached. The value of a meta pragma tag is always, "no-cache".

In Frontier, it would look like this:

#metaEquivPragma "no-cache"

Examples

#metaLocation "Chicago"

results in

<meta name="Location" content="Chicago">

The image below shows how this website's #metaSomething directives are set up. See the source to see how it turned out.

Two more meta-related directives

There are two more meta-related directives:

  1. #includeMetaGenerator

    This creates a meta tag that shows Frontier as the generator of the page.

  2. #includeMetaCharset

    This creates a meta tag that shows the proper character set for the page. This is useful when doing pages in foreign languages. This works with the #charset directive.

These directives can also be set in user.html.prefs. (I set both of these to false.)

Other Links

Ideas & Issues
Site Outline

I&I Home
1998
  05
  Improving Javascript Support
  Featuring suites.jsl: A pageheader script for the <SCRIPT> tag.
  06
  Character Entities
  Make working with HTML character entities easy.
  Copy Address
  FileWriters Questions
  Ideas for discussion
  Navigating the ODB
  Making it easier to get around in Frontier
  Suite Info
  If you write suites, tell your users about yourself!
  07
  Binary Objects in Your Website
  Frontier needs to learn how to render binary objects
  Creating META tags
  How can I put <meta> tags into my Frontier web pages?
  Filemaker and Frontier
  Where can I find resources for scripting Filemaker with Frontier?
  Frontier Mailing Lists
  More signal, less noise
  08
  Comments on Fat Pages
  Good fatpage, bad fatpage
  Quiet Advances
  Userland continues to crank out new features, bug fixes.
  Render Table Memory Issues
  An easy fix to a problem with rendering huge websites
  12
  Rendering out to more than one server
  Filewriters should be able to see the adrPageTable

   
Back to I&I Home   >>  

Back to
the top

This is Phil's Frontier Scripting Site. San Francisco, CA
Copyright © 1996-98, Phil Suh. All Rights Reserved.
http://www.filsa.net/frontier/ii/1998/07/metaDirectives.html
This page last built on 6/28/99; 11:07:53 PM

filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ]