Saturday, December 09, 2006

Favicon updates

The little icons next to the story URL in BlogRevolution are called "favicons." Users of many web browsers — but not Internet Explorer 6 — see these next to every URL in the Location Bar or its equivalent.

Favicons are usually located at the root of the web server at /favicon.ico but may also may be specified by a <link> tag in HTML.

For example, Blogspot's favicon looks like this:

Until now, BlogRevolution would detect the location of a story's favicon and test the image file to make sure it was valid. It would then discard its copy and when an update to the site was generated it would show the favicon by creating an <img> pointing to the favicon URL on the original site.

By including a copy of the favicon on BlogRevolution's server, we can improve user experience in several ways:

  • Sometimes Safari would refuse to show .ico images correctly, and users on this browser would see a broken image icon.

  • Internet Explorer would show the lowest-resolution version of the icon available rather than the highest if multiple resolutions of the icon were contained in the .ico file.

  • Far away servers would occasionally refuse to serve up the file, resulting in a broken image icon on any browser.

  • The .ico file format was never particularly efficient and BlogRevolution will now convert favicons to png, typically resulting in a file size 10 or 20 times smaller. The Blogspot favicon is 3638 bytes, but in our format you browser would have to download just 238 bytes. This will lower page loading time.

  • Page loading time will be reduced in most circumstances because your operating system will not have to resolve different domain names for each icon. On the other hand, load on our server will be increased.

Internally, BlogRevolution stores favicons under the hash of the .ico file data, because many blog or content management systems provide a default favicon whose owners never change it and as a result many sites end up with the same favicons.

It's the little things that count I suppose, and this update was long in coming.

No comments: