The syndication of style & layout

Sigfrid Lundberg's Stuff 2010-03-28

Bookmark and Share

The most frequently retrieved document from this site is my syndication feed. I can tell that from the otherwise lousy statistics provided by my ISP. I also use Google Analytics, and the crude statistics from FeedBurner. Analytics doesn't tell me anything about the use of the feed, since I cannot embed javascript in a feed. Only Googlebot (I use it as a Google Sitemap) and Feedburner accesses the feed directly. The rest of you get the feed via Feedburner.

Feedburner keeps a cache, and refreshes that every 30 minutes. The feed is retrieved around 250 times a week, and I would have expected 2*24*7=336 hits on the feed. Note that 250 includes Googlebot. Since I've no direct access to the Apache log files I cannot tell how the file is retrieved. If I was Google I would add an If-Modified-Since header to my GET request and looked for a Status 304 (not modified) in the response. Then I could get away with a much lower access frequency and gain throughput. This would explain the slightly lower access rate than expected.

My estimate is that about five to ten persons visits my site daily and that two or three of them read something. Furthermore, between ten and fifteen readers follow me using the feed. In particular the use stats for the feed is hard to evaluate.

Headless Layout & Absolute Links

All the entries on this site are written directly in Atom using nxml mode for Emacs. The site is generated from this source using a number of different scripts, the bulk of it written in XSLT. The source file for this entry is here. There are two things you have to think about when you write and design your content for syndication:

  1. Your content will be rendered in sites which isn't yours: You cannot use relative URIs, and a lot of your javascript won't work.
  2. You have to manage without the <head>...</head> and everything you normally would put there which implies that you can not use <style>...</style> elements and that you are unable to define CSS classes.

The problem with javascript manifests itself has a nice category browser, which can be used on some of KB's data. It seases to work at least when stuff is syndicated on Google Hompepage.

Entry on Google Homepage
Entry on Google Homepage

Fig. 1. My previous entry as it appears on my iGoogle Homepage. Note that all the captions appear next to the first two images, not as they should adjacent to each corresponding one. This is Google Chrome but it looks the same in Firefox.

When I write these entries I preview them using the server I run on my laptop. Making the links absolute is the last thing I do before publishing to the web. I forget this now and then, and I won't see that before it has been through feedburner and reached google and bloglines. The rebuild-run-debug cycle is long for syndicated content.

There might be problems with the feed readers' HTML support. I'm currently only the online ones, iGoogle and Bloglines, so the html shouldn't theoretically not be a problem on them, but still there is.

One is that (for instance) Google defines stuff in its CSS which changes the behaviour of tags in a way such that my content does not look as intended. The <kbd>...<kbd> (keyboard) didn't work the last time I checked. The other problem is that (for instance) Google actually edits my markup. It seems that in my previous entry, the one about stanford, Google stripped the <br clear="all"/> elements from its attribute (clear="all") and that CSS redefines the break tag in some way or another (see Fig. 1).

An experiment

Please bear with me. Below you find the content from my previous entry. In this version I'm employing some other methods for achieving a break. I indicate in the text which method I use.

Garden in Palo Alto
Garden in Palo Alto

A lovely garden somewhere between our hotel and the Meyer Library at Stanford University. Break is the original <br clear="all"/>. Predicted behaviour: No break will be generated in Google.

Rodin at Stanford
Rodin at Stanford

Gustave Rodin at Stanford University. You may want to compare this with the Rodin in Copenhagen. Break is using CSS <br style="clear:both;"/> Predicted behaviour: Will not generate a break if Google strips all attributes on <br/> and generate one if it just strips clear


A nice graffiti, or is it al fresco? And what is the difference? Break is using an empty <div style="clear:both;">...</div>. Predicted behaviour: Will generate a break in Google.

Science against an evilgelical religion. Break is again a <br style="clear:both;"/>

The Papua New Guinea Sculpture Park. <br clear="all"/> as before

The view from my hotel room.


Subscribe to Stuff from Sigfrid LundbergSubscribe to my stuff

stuff by category || year


My name is Sigfrid Lundberg. The stuff I publish here may, or may not, be of interest for anyone else.

On this site there is material on photography, music, literature and other stuff I enjoy in life. However, most of it is related to my profession as an Internet programmer and software developer within the area of digital libraries. I have been that at the Royal Danish Library, Copenhagen (Denmark) and, before that, Lund university library (Sweden).

The content here does not reflect the views of my employers. They are now all past employers, since I retired 1 May 2023.

Creative Commons License
This entry (The syndication of style & layout) within Sigfrid Lundberg's Stuff, by Sigfrid Lundberg is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.