Home
About
Agents
CGIs
Mac
Macros
Misc
Stories
Suites
Websites
Outline
Frontier
Scripting

suites.siteChanges

Background

On www.scripting.com, every night at midnight Pacific, a script runs that scans all the files being served over the web, updating an XML file that lists all the changed files, grouped into 24-hour periods.

Why this is interesting

A search engine like Alta Vista, InfoSeek, HotBot or Excite could read this file every night. They wouldn't have to crawl the whole site to find the pages that changed, as they do now, they could just load the pages that have changed since the last time they visited. If this became a standard feature of all websites the performance of search engines could be dramatically increased.

It's a very simple script, you could do it in any scripting language on any operating system. Here's a great starter project for any webmaster interested in XML. If you think we should change our format, or add features, or submit it to W3C as a standard, send email to dave@userland.com. Let's get going with XML, here's a good place to start.

Frontier 5.1.3 users can start generating this file right now...

How to install

suites.siteChanges requires Frontier 5.1.3 or greater.

After loading the object embedded in this fat page into your database, open suites.siteChanges and run siteChanges.init.

What siteChanges.init does

  • It creates user.siteChanges, with two sub-tables: prefs, containing preference settings; and structure, containing the accumulated changes info; and a script, qualifies, that determines if a file should be included in the report.

  • It creates user.scheduler.overnight.siteChanges, a script that runs every night at midnight, and calls siteChanges.refresh, the script that does the work of producing the XML file.

Setup

Open user.siteChanges and choose Expand Everything from Frontier's Outliner menu to make all the fields visible.

In user.siteChanges.prefs change:

  1. outputFile to contain the path to the XML file you want siteChanges to maintain.

  2. siteFolder to contain the path to the folder you want siteChanges to scan every night.

user.siteChanges.qualifies is a script that returns true if the file should be included in the report, false otherwise. We initialized it to return true for files that end with ".html", if you want to link to other files, you will want to change this script.

In user.siteChanges.structure, edit the url field to point to your website. Edit the webmaster field to contain the email address of a human being who can help people use the XML file.

Here's a screen shot of a typical setup:

Checking it out

Run siteChanges.refresh. You may need to tweak the settings until everything is set up correctly.

That's all there is to setting it up. Just leave Frontier running on the machine, and every night it will update the XML file.

Pointers

Check out the XML site for information on working with XML in Frontier.


This is a fat web page containing suites.siteChanges. More info on fat pages here.

© copyright 1997-98 UserLand Software. This page was originally posted on 8/25/98; 6:44:55 AM and it was last built on 9/11/98; 9:23:40 AM. Webmaster: dave@userland.com.