SafariBox

The new device in the right-hand column of my template is a SafariBox -- it's like the GoogleBox, but for Safari Books Online. Disclosure: I helped design Safari and sometimes still advise the project, though rarely nowadays. I'm using the SafariBox here because I enjoy being reminded about books, and -- as with the GoogleBox -- because I enjoy making serendipitous search-driven connections.

To receive HTML from the SafariBox, use an URL like this:

http://safari.oreilly.com/safaribox.asp?
  v=s&t=0&q=javascript

Try it.

If your blog software can make HTTP calls at page-construction time, you can use this version to dynamically generate SafariBox content into your statically served pages. I'm doing that in a Radio UserLand macro, for example.

Alternatively, you can let client-side JavaScript handle things at page-load time. It's the same strategy that, as I mentioned the other day, could enable a Technorati trackback counter.

To receive JavaScript that writes the SafariBox HTML, tack on j=1 and wrap the URL in a SCRIPT tag, like this:

<script 
  src="http://safari.oreilly.com/safaribox.asp?
  v=s&t=0&q=javascript&j=1">
</script>

That's the method I'm using in this post. There's a character encoding/decoding glitch, by the way. If you see "Top?5" instead of "Top 5", the question mark was was originally, I think, a Unicode non-breaking space -- U+00A0. My Radio UserLand macro sees it as \xA0, and converts it to a space. Firefox renders it as a question-mark when using the UTF-8 encoding, but as a space when you switch to ISO-8859-1. MSIE, though, seems to render it as a space using either encoding. Go figure.


Former URL: http://weblog.infoworld.com/udell/2004/04/16.html#a974