It’s dangerous to go alone

November 7, 2001

Mozilla adds support for HTML 2.0–era feature

Among the features in iCab that I’ve wished were implemented more widely is the site navigation toolbar (or “Standard Links Toolbar”, as they put it). Web pages have been able to declare their relationships to other pages by using the “link” element since the early days of the HTML standard, but few web browsers have taken advantage of them, so most authors don’t bother including them. This is a shame, in my opinion, because they help define the structure of web sites, rather than single pages.

ZedneWeb actually does include many of the common link types in its pages, including “next” and “prev” for past entries and other sequential sets of pages and “top” on most pages to get back to the front page. Others are “up” and “contents”, which aren’t used too consistently. (Yet.)

Up until recently, iCab and Lynx were the only browsers that made some use of them, but Mozilla 0.9.5 has added its own site navigation features, and even added a nice touch: The new toolbar can be configured to stay hidden except on pages that include the links.

Sadly, Mozilla (the open-source implementation of Netscape) is still slow and buggy, but it’s getting there. Hopefully, Microsoft will pick this up for Internet Explorer as well. In the meantime, authors remain free to add link elements to their pages; it’s been part of the standard since the beginning, so it doesn’t cause any problems with older browsers, and it will hopefully make navigation easier in the future. (via mac.scripting.com) #

Sequence bookmarks

If you read a lot of on-line comics and weblogs, like I do, you’ve no doubt had the experience of going on vacation or otherwise not being able to keep up for a few days or weeks, and then had to work your way backwards in the archives so you can pick up where you left off. Or maybe that’s just me. Anyway, I’ve experienced this often enough (typically after weekends) that I’ve started thinking about ways to make it less painful to catch up when one has fallen behind.

What you want, ideally, is to be able to select, say, “Sluggy Freelance” from your bookmarks list and automatically get the “next” comic, where “next” means “the one following the last one you read”. One possible way to implement this is with a membership system, where you log into the comic web site, and it remembers the last comic you saw and sends you the next one. I don’t like this solution, because it’s yet another user-name and password to remember and requires the web server to remember every single visitor and where their place in the sequence.

It also demands some sort dynamic page serving, and I’d like this scheme to work for statically-served web sites (like this one). (A dynamic web site changes the contents of the pages it serves based on conditions at the time of the page request, whereas a static web site changes when the author goes and changes it.)

A better solution, as I see it, is to extend the concept of bookmarks to include not just pages, but page sequences. Browsers might allow many different ways of working with page sequences, but the basic idea is that it remembers where in the sequence you were the last time you visited it, and takes you to the next page in the sequence when you return (if there is a next page yet).

The first question then is: How does the browser know that a given page is part of a sequence, rather than just some random page? It turns out that this can be handled by a fairly simple page sequence convention. Each sequence will have an introductory page that conceptually represents the entire sequence, and that page will note the latest item in the sequence, using a “link” element with the relation “latest”. The pages that make up the sequence itself link to the introductory page with the relation “sequence”, and to the next page in the sequence with “next”. (They may also link to the previous page with “prev”, but that isn’t required.)

In order for the browser to work with a sequence of pages, it first has to know that the given pages are part of a sequence. (Makes sense, right?) I propose a fairly simple convention for marking page sequences, taking advantage of the “link” element. In its simplest form, each page in the sequence is linked to the next page in the sequence (using the “next” relation). The last page has no “next” link. In addition, all the pages in the sequence link to an introductory page that conceptually represents the entire sequence, using the “sequence” relation. If a browser sees a “next” and a “sequence” link in the page header, it knows that the page is part of a sequence. (Pages should also specify a “prev” link, but the system will still work if they don’t.)

The introductory page has a link to the last page in the sequence, using the “latest” relation. This page corresponds to the front page of ZedneWeb or Sluggy Freelance: it’s the one people give when they want to refer to the sequence as a whole, rather than any specific page in the sequence.

This gives us an ordered list of pages and a way of referring to them as a whole, but what do we do with it? This is where the web browser comes in. In addition to normal bookmarks, the browser would be able to bookmark sequences. In its simplest form, the browser would remember the addresses of the introductory page and for the latest visited page in the sequence.

When the user bookmarks a sequence, the browser can determine these two addresses based on the links and the address of the current page. For the introductory page, the “latest” link provides the initial value for the latest visited page. For pages in the sequence, the page itself is the latest visited page and the address of the introductory page is given by the “sequence” link.

When the user selects the sequence bookmark, the browser starts loading the page given as the latest visited page and looks for the “next” link. If it finds it, it halts the download, begins downloading the next page, and updates its record of the last visited page. Otherwise, it downloads normally.

If the user is viewing the list visited page and follows a link which takes it to the page listed as “next”, the browser updates its record of the last visited page to the new page.

If the user is visiting some other page in the sequence, the browser will not automatically change its record of the last visited page, but it should allow the user to manually set the record to the current page.

That’s all there is to it. Some extra link elements in the pages, and a little extra intelligence in the browser. One could even write a fairly simple web-based application which provides similar functionality for browsers that don’t support the convention. It’s also significant that it doesn’t require any different communication protocols between the web browser and the web server. The server merely provides pages with a defined relationship to one another, and the browser uses that information to make the user’s life easier.

Simple and useful, perhaps. But it doesn’t lend itself to flashy, marketing-friendly presentations, so we’ll never see it implemented. Oh well. #