Recapitulation of Navibar

Markus Siebeneicher devised a document format to allow a webmaster to express the structure of his website – i.e. a sitemap – in a medium-independent way. He also wrote a Firefox extension, Navibar, that would take this sitemap and display it as a sidebar. This would help a webmaster to factor out repetitive navigation menus from all his pages, and separate the style of navigation from its content, e.g. an alternative extension might pop up a menu from a toolbar.

The extension was first released probably around mid-2005(?).

If a new, maintained extension using an existing or new sitemap format appears, please let me know! Not A9 SiteInfo, though, unless it improves. (Actually, the format isn't bad; just the extension that reads it.)

In fact, a new project has appeared. You may prefer to switch from Navibar to Standard-Navigation (although it's still in development) which I've got myself involved in.

Related links

Advocacy

Someone commented that they'd rather invest their time into creating a good menu with xhtml/css instead of learning to write a Navibar sitemap file. Fair enough, but my experience of navigation menus built into pages is not good – they take up valuable space (often in some atrocious fixed-width design), and there's no way to turn them off, being completely coupled to the one way in which they are presented. They also tend to be repeated on every page in the site, and often appear first in the page (after turning off the bad CSS), so they get in the way of the actual content lower down the page.

On the other hand, a sitemap file is a way of separating style/presentation from content. The Navibar extension presents the sitemap in a sidebar. Another extension could be written to present it another way, e.g. as a menu button. A speaking browser could present the links in a way which clearly indicates that they are for site navigation, because it can directly infer that purpose from the sitemap file – something it can't do with an embedded HTML menu. In summary, the visitor chooses how the sitemap is rendered, if at all.

Sites supporting a Navibar sitemap

Here's what I've found so far. I expect there are more, but it's hard to look for them directly via Google…

It would be nice to list a few more… Let me know, please!

You'll notice very few English-language sites in that list. Perhaps this is due to guides to Navibar being written in languages other than English – because an extensive site for that already existed – and these persisting after that extensive site had vanished.

Purpose of this page

I liked Navibar! So I started using it in my sites. Unfortunately, the documentation for the extension (at http://navibar.oaklett.org/ – detailing how webmasters and websurfers should exploit it – disappeared some time around mid-2006! Indeed, the entire oaklett.org domain seems to have gone, along with any chance of contacting the author through the published email address.

(Actually, the author, Markus Siebeneicher, has got in touch with me, and has provided some helpful information — Thanks!)

Yet the extension is still available from the Mozilla Add-ons site, so websurfers can still install it. But without the documentation, webmasters won't know how to use it, so then websurfers will never find sites which exploit the sitemap format, and so the installation will never be engaged.

This page aims to provide replacement documentation, albeit rather sparse, but just enough to make the extension worthwhile. It also might be useful to another developer who would be inspired to do an alternative extension that can read the same kind of sitemap file as Navibar, but present it in a different way, such as a menu hierarchy from a configurable toolbar button. (Nudge!)

Navibar Documentation for Web Developers

A website maintainer might wish to provide a sitemap to allow visitors to navigate around his site easily. The three steps involved are:

  1. Writing a sitemap — Navibar's native RDF/XML format is described.

  2. Serving a sitemap — Make sure that browsers can access the sitemap file.

  3. Attaching a sitemap to a page — Cause the browser to load and display the sitemap when the user visits pages within the site.

Writing a sitemap

The Navibar sitemap format allows you to express a collection of related links (which I'll call entries) in an arbitrary hierarchy. It even allows parts of the hierarchy to be logically duplicated in several places, without actually being duplicated in the sitemap file.

Although the represented sitemap is hierarchical, the format is flat RDF. Your file will initially look something like this:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:map="http://www.oaklett.org/map/1.0#"
      xmlns:dc="http://purl.org/dc/elements/1.1/">
  <!-- Insert entries here in any order. -->
</rdf:RDF>

You can then insert entries in any order — it will not affect the order of the represented sitemap, but you need at least one description for each distinct node (including leaves) in the tree.

Adding an entry

Each entry appears as an <rdf:Description> element, for example:

<rdf:Description rdf:about="mydomain:c6:c3">
  <dc:title>Farquart's Tubular Emporium</dc:title>
  <dc:identifier>http://www.farquart.com/</dc:identifier>
  <map:icon>http://www.farquart.com/favicon.ico</map:icon>
</rdf:Description>

You need to give each entry an internal identifier as the value of the rdf:about attribute (mydomain:c6:c3:e29 in the example above), and it must be unique within the sitemap. It allows any number of other entries to refer to it, making it a child of each of them in the hierarchy. It is the association by internal reference, rather than by XML structure, which allows an entry to appear at multiple points in the sitemap (although, I admit, it does make it more verbose and less intuitive).

Any URI (or IRI?) will do for the rdf:about attribute, pretty much, so long as it has no chance of clashing with anything else. Maybe urn:farquart-com:blah is more robust, but putting everything under mydomain: seems to have worked for me! And that probably came straight out of the original documentation.

The content of each entry is a set of Dublin Core elements. The main ones to have, as seen in the example above, are these:

dc:title

This is the text that will appear in the menu entry for this description.

dc:identifier

This is the address (a URI) of the page that selecting this description should take the visitor to. A URI relative to the sitemap is now permitted (since version 0.10.2, I think).

Although the sitemap is intended to allow the visitor to navigate easily within your site, there is nothing to stop you referring to external sites. You might re-iterate the external sites which your site refers to, for example.

map:icon

Not from the Dublin Core, this specifies an icon to be used beside menu entries. It needs to be a full URI, unfortunately, not one relative to the sitemap file.

With one exception, a node will not be displayed unless it contains both dc:title and dc:identifier. If you need an entry that has children or a (sub)menu, but doesn't have anywhere to point to, you could use null: — not ideal, as it generates a nasty pop-up when you click it, but the entry will be displayed without going anywhere misleading.

Here are a couple of questions for you:

Forming the hierarchy

You can now combine several entries as siblings of each other by making them children of another node (the parent). The parent node's <rdf:Description> must contain a <map:container> or <map:embedded> element, which lists references to the child nodes. For example:

<rdf:Description rdf:about="mydomain:c6:c3">
  <dc:title>Farquart's Tubular Emporium</dc:title>
  <dc:identifier>http://www.farquart.com/</dc:identifier>
  <map:container>
    <rdf:Seq>
      <rdf:li rdf:resource="mydomain:c6:c3:e53" />
      <rdf:li rdf:resource="mydomain:c6:c3:e54" />
      <rdf:li rdf:resource="mydomain:c6:c3:e55" />
    </rdf:Seq>
  </map:container>
</rdf:Description>

A <map:container> causes the entries for the contained references to appear as children in the collapsable hierarchy visible in the Navibar sidebar. The effect is comparable to expanding or collapsing a folder in the bookmark sidebar. On the other hand, a <map:embedded> causes the entries to appear in the context menu of the parent entry. If such a sub-entry itself has a <map:embedded>, it will appear as a submenu.

An entry can have both types of sequence. I'm not sure, however, whether a <map:container> is accessible from an entry which itself is inside <map:embedded>. Multiple <map:embedded>s or <map:container>s are not permitted. (I don't know what happens if you put several <rdf:Seq>s in a single <map:embedded> or <map:container>. I'll have to try it out sometime.)

Ah, just seen an archive of the original specification — <map:container> indicates that the child items should appear in the same view as the parent; <map:embedded> indicates that the children should appear in some new kind of view. That implies that grandchildren of <map:embedded> should themselves be in a <map:container>, though it doesn't clarify what should happen with other combinations of ancestry, or with multiple <map:*>s of the same type.

The original specification also uses <rdf:Alt> (for a set of alternatives) and <rdf:Bag> (for an unordered set, perhaps implying that the extension should remember personal sorting preferences) instead of <rdf:Seq>.

Finally, and most importantly of all, you need to specify the root node. This does not need a dc:title or dc:identifier, but it does need a certain internal identifier, urn:sitemap:root. For example:

<rdf:Description rdf:about="urn:sitemap:root">
  <map:container>
    <rdf:Seq>
      <!-- references to top-level entries -->
    </rdf:Seq>
  </map:container>
</rdf:Description>

It needs at least one <map:container> for the top-level, uncollapsable entries. A <map:embedded> will probably be ignored, I suppose.

That's it!

Serving a sitemap

A Navibar sitemap file is optimally served as the MIME type application/rdf+xml. A few other, less specific types might also work.

Being rather verbose, Navibar sitemap files can get quite big, so compression would be desirable. Happily, it turns out that gzip-ing the file and transmitting it with a Content-Encoding: x-gzip header functions perfectly well. Firefox probably decompresses it transparently before Navibar even sees it.

The configuration to achieve this when serving a sitemap file with (say) a .rdf suffix from Apache HTTPd is as follows:

AddType application/rdf+xml .rdf
AddEncoding x-gzip .rdf

Note also that language-based HTTP content negotiation also works happily with Navibar.

Attaching a sitemap to a page

While the Navibar extension supports four methods of associating a sitemap with one or more pages, it is my opinion that two of these are flawed in design, and a third is flawed in implementation. This leaves one method which I recommend: place a <meta> element inside <head> to refer explicitly to the sitemap file. For example, if the sitemap is in the file sitemap.rdf under the same virtual path (i.e. in the same directory on most systems), use this:

<meta name="navibar-sitemap-url"
   content="sitemap.rdf">

A relative URI appears to be acceptable for the content attribute.

The other methods, which I deprecate, are:

You can use the first of these deprecated methods (HTTP header), but don't rely on it. If you use the <meta> method as recommended, the header will only have any meaning for non-HTML pages.

Do not employ the last two methods! They are strongly deprecated. See also:

I hope sites that currently provide Navibar sitemaps using one of the last two methods already will consider placing explicit <meta> tags in the <head> element of each of their pages, then users can afford to switch off this misfeature.

If you currently rely on the last method, all it takes is to add:

<meta name="navibar-sitemap-url" content="/sitemap.rdf">

For the last-but-one method, use similarly in each page:

<meta name="navibar-sitemap-url" content="sitemap.rdf">

Publicity

Markus designed some icons for web designers to place on their pages to show that Navibar is supported. I did my own too:

[Navibar feature icon]

Navibar Documentation for Users

Once installed, Navibar will sit quietly in your browser, and can be set up to automatically display sitemaps (in a sidebar) when you visit sites that have them. You can basically forget about it most of the time, and it will spring into action when it has something to offer.

However, there are some aspects of configuration which you should check immediately after installation.

This last point is very important. As you browse with Navibar enabled, it will try to obtain a sitemap for each page you visit using upto 4 methods. Two of these are quite aggressive, and will cause Navibar to ask the server for a file which will likely not exist. This means, every site you visit that doesn't provide a sitemap will end up with an error message in its logs — possibly several, each few days that you visit, and this is then multiplied by however successful Navibar becomes at being deployed.

The other two methods are benign, as they get their information from the page that has already been delivered. Unfortunately, one of these doesn't work very well, and could cause problems — leaving only one real option.

Which fetching methods to enable

Navibar looks for a sitemap in upto four places, according to configuration. As a websurfer, I recommend this configuration (under the Loading Phase Steps section of the Sitemap Source tab):

I suppose that the package will no longer be maintained, so the compatibility information will not be kept up-to-date. It appears, however, that the latest version remains compatible with Firefox 3.0, and so you just need to update the install.rdf file manually:

  1. Unzip the navibar-0.10.3-fx.xpi file into an empty directory.

  2. In the file install.rdf, search for the line containing maxVersion, and change it to read:

    <em:maxVersion>3.0.*</em:maxVersion>
    
  3. Zip the files back up into navibar-0.10.3-fx.xpi, and ask Firefox to install it.

-->

Enhancements

I've managed to hack in a few extra features, but I've not released a new version with them yet — still trying to fix a small point.

Contacting me

Contact Steven Simpson