University of Vermont

UVM Self-help Web Guide

Meta Tags, Javascript and Fav Icons

The head sections of web pages in the UVM Template System are generated automatically by magicscript. Occasionally developers desire access to the head section in order to add meta tags or certain javascript files. This is possible by creating specially named files and place them in the root folder of a web site.

Meta Tags

You can add your own meta tags to any site, and they will appear with the HTML code inside the main head tag of your document.

All you need to do is create a text file called metatags.html that contains the meta tags and save it in a directory in the folder with magicscript.php. Magicscript will read this file and insert your custom meta tags as it creates the document. Each page in the directory will have the meta tags automatically. You can do this for any site that lives in it's own directory. Note: Only meta tags will be added to the document; all other HTML tags and text will be ignored.

The following meta tags are already included in every document automatically by the publishing system.

  • <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  • <meta name="author" content="The University of Vermont" />
Useful Meta Tags

The following are some examples of useful meta tags and other tags that you might consider including in your metatags.html file.

<meta name="description" content="A premier small public research university nationally acclaimed for excellence in liberal education, medicine, biological and health sciences, and environmental leadership." />
<meta name="keywords" content="holiday, Greece, sunshine" />
Declaring Web Site Language
<meta http-equiv="content-language" content="en-us,fr" />
Preventing Browser Cache
<meta http-equiv="cache-control" content="no-cache" />
Search Engine Prevention Meta Tags
<meta name="robots" content="noindex" />
The content field can be a comma separated list with the following values:
index: search engine robots should include this page.
follow: robots should follow links from this page to other pages.
noindex: links can be explored, although the page is not indexed.
nofollow: the page can be indexed, but no links are explored.
none: robots can ignore the page.
noarchive: Google uses this to prevent archiving/caching of the page.
Site Level Print Style Sheet
<link rel="stylesheet" href="site-print.css" type="text/css" media="print" />

Site-wide JavaScripts

Most JavaScript can be added inline to your web ages, but if you need JavaScript to appear specifically in the head section in your site's pages, add the appropriate code into a file called javascript.html as follows:

<script type="text/javascript" href="my-script.js" />

< /script >

Page-level Meta Tags and JavaScript

We are currently developing the ability to add meta tags or JavaScript only to specific pages of a UVM Template site. Stay tuned to this page or UVMWEBINFO for updates on this feature.

Customizing the Favicon

A Favicon is a small graphic which appears in many web browser's "Address Bar" and "Favorites Folder" when a visitor visits or bookmarks your site. UVM's uses a standardized favicon throughout much of the UVM Web site, as seen here in a .gif format:


A Favicon file must conform to a certain size and be saved in its own .ico specialized format. To find out more about making a Favicon visit (The Web Team uses the Macintosh shareware application GraphicConverter to create favicon's for the UVM site.)

Once you have a Favicon file you'd like to use on your template site, simply add it to the directory that contains your magicscript.php and it will appear throughout your Web site.

Last modified August 13 2012 09:08 AM