Dan Harkless' Old Modification Date Embedding Scheme

NOTE: This text was written back when I was still actively doing this on my site, and has not been reworded to reflect the cessation of this technique. The reason I'm no longer using the scheme is explained in the paragraph that links to here from the parent page. I expect to add some more commentary on this after I write my planned site-map-generating script.

You may have noticed the "?YYYY-MM-DD" strings that appear at the end of my intra-site URLs. These appear to be CGI query strings, but as they're being appended to the URLs of static HTML files, they simply get ignored by the webserver. They aren't ignored by the browser, however. These strings indicate the date a page was last modified. This way, assuming you keep using the same browser, and have your history expiration set to a reasonably high value, you can instantly tell when a page on my site has been updated since you last visited it, because the URL will have changed and it will now be displayed in the LINK color rather than the VLINK color.

(Note that I have intentionally not set the LINK and VLINK colors, so they'll be whatever your browser defaults to, usually blue and purple, respectively. I hate it when webmasters change those colors arbitrarily (as opposed to changing them for necessary color scheme reasons), especially when they pick two colors that are hard to tell apart, or even set them to both be the same color!)

Whenever I change a page, I open its parent page and set the date in the link to the child page to the current date. I then do the same for the parent's parent page, and so on, propagating the new date all the way up to my top page. Therefore, you never need to dig around and check all the "Last modified:" dates in the footers to find changed content on my site. Simply go to the top page and follow the LINK-colored links. Even if there's only one changed page since you last visited, the link colors will guide you in drilling right down to the new content, without having to bother with any side pages you've already seen. Even if you're using a very low-functionality browser that can't display link colors, you can manually dates in links to the last date you visited.

Note that of course I only append these modification dates to the main link to each page. I don't for instance, append them to the parent page links in the footer (accessed with the up arrow). If I did this, then changing a page would require changing all its child pages, which would mean changing all their child pages, eventually leading to the modification dates for every page on my site changing whenever I changed a single page.

A somewhat unfortunate consequence of this is that when I include a cross-link to a page (i.e. add a second link to a page besides the normal link to it in the navigational hierarchy, something I don't do all that often), this link does not include the modification date. Thus these cross-links will not change colors depending on whether pages have been modified, the way the main links do. So, for instance, the links leading to the site map will only go back from VLINK to LINK when a new page is added (or removed), rather than every time any page is updated.

Finally, note that when I write CGI scripts to generate pages, as with my online photo album, I make sure they follow this convention of including modification dates in their navigation URLs.


Up
Dan Harkless
Last modified: June 28, 2003
Validated HTML 4.01 Transitional