Web authors may declare alternate versions of a single web page, exposing additional languages available or various file formats. HTML documents express these relationships using the
link element in the document header.
A single Wikipedia article about “search” might have alternate representations and translations, such as “buscar” in Spanish, “suche” in German, “rechercher” in French, etc. A search engine or web browser software can discover the availability of these alternate document versions if declared by the publisher.
<link title=”Arabic” href=”http://ar.example.com/” rel=”alternate” hreflang=”ar” type=”text/html” charset=”ISO-8859-6″ />
The example markup above advertises an alternate version of example.com available in Arabic expressed in the ISO character set 8859-6. If a user capable of reading Arabic arrives at the page they can now take appropriate action.
The HTML specification also allows publishers to associate alternate file formats with a web page. A publisher might declare alternate versions of the page available in plain text, PDF, or a web feed format such as RSS or Atom.
<link title=”Print Me” href=”http://example.com/index.pdf” rel=”alternate” media=”print” type=”application/pdf” />
Modern browsers take advantage of these alternate file format declarations, lighting up a special icon when a web feed is discovered. Internet Explorer 7, Firefox 2, and Opera 9 advertise the availability of a web feed corresponding to the viewed web page.
The ease-of-use and availability of these new feed discovery tools will convert website visitors into website subscribers, strengthening each user’s relationships with your content.
This post is the part 1 of 2 of a 15-minute feed syndication best practices presentation from WebmasterWorld PubCon 2006 in Las Vegas. Part 2, Feed publishing best practices, is much longer.