PERSISTENTLINKSTO GLOBAL RESOURCES

Web resources that are intended for the whole public, the Universityof California system, or all of UCSB should bereferenced by URIs that do not change. Examples of these global resources include campus maps, visitor resources, UCSB policies pages, major department/division home pages, official UCSB artwork, and the like.

When URIs change, old bookmarks and search engine results become obsolete. The information becomes more difficult to find, less prominent, and creates a maintenance burden for all other sites and pages referring to them.

Instead, create URIs that "don't go away." The following recommendations will make these resources more useful as permanent bookmarks and more easy to access from search engines.

Recommendations for Building a Persistent URI

  1. Don't include file extensions that expose or require a media type. Although Webservers have been delivering html filesfrom the beginning, future Web servers may, for example, deliver xml or xhtml files of various versions. Many browsers will attempt to map the file extension (after the last period) to a file type. Then if your framework or technology changes, all the URIs with file extensions will have to change.

Example

Original URL:

Persistent URI: /webguide

  1. Don't include anything in your URI that is specific to a programming language or platform, such as .pl, .php, .jsp, servlet, cgi-bin etc. Presentation technologies may change, but the data (or purpose of the data) will not.

Example

Original URL:

Persistent URI:

  1. Do not hint at whether the global resource page is static or dynamically generated.As in item 1, URL parameters passed in dynamically generated pages (i.e, pages whose URIs includea ? and & characters with text) are subject to change.

Example

Original URL:

Persistent URI: /current-events

  1. Try to avoid a trailing "/" in your persistent URI so that users never have to consider whether the URL requires it or not.

Example

Original URL:

Persistent URI:

Techniques for Creating Persistent URIs

Intelligent Web site architecture and planning is the first step toward building URIs that last. For example, if you have global resource Web content that you know will end up being archived, it makes sense to put that content in directories named by date right up front, and link to it from a standard index page whose URL will not change. But for thosewho are working with an inherited site structure, the following techniques can help.

Rewrite the URI on the Server

The best solution is to have the URI rewritten on your server. The technique will vary according to your platform or programming language. The Apache Web server, for example, has powerful features to help you do this and it can be installed as a proxy in front of many other Web applications.

To illustrate with the example from Item 3 above: when receiving a request for "/current-events", the server at will rewrite the URI to "/cgi-bin/calendar.cgi?month=7&events=all". Users will only see the persistent form of the URI which they can bookmark, while the server can use the existing script and rewrite the request to include the current month, etc.

Maintain a Redirect Page in a Permanent Location

A simpler solution for making a persistent URI is to create a redirect page in a location you know will not change (set, for example, as the default page in a directory created for the purpose). If the URL of your global resource page changes, you simply update the redirect page.

Set Your Resource as the Default Page in a Directory

The simplest solution for creating a persistent URI is to place your global resource page in a directory and use your Web server software to designate it as the directory's default page. Using the example from item 1 above, the page "index.shtml" is set to be the default page of the directory "webguide." The URI may need to end in a "/" against the recommendation of item 4 above, but nevertheless provides a persistent link.

References: