« Off with his head | Main | Country Bumpkin released »

UWA Directory OpenSearch plugin

I have written an OpenSearch plugin to simplify searching the people directory of The University of Western Australia. It works in most modern browsers (not six-year-old Internet Explorer 6).



Technical Notes

If you follow the instructions at the Mozilla Developer Center then you may not realise that the plugin can be installed with Javascript (such as with the button on this page) rather than autodiscovery. This is useful for a couple of reasons:
  • Autodiscovery (as demonstrated for the UWA Directory) relies on a link in the <head> element of the web page, which is inaccessible in many blog and content management systems. In those situations, people place the link within the body of the document. This may work, depending on browser, but is certainly invalid markup.
  • It easier for users to add the search engine when it's provided directly, rather than having to provide a whole page of illustrated instructions

The Mozilla instructions also do not indicate any option other than encoding the search icon within the xml file itself, using Data:URI. In fact, a URL to an external image file is perfectly acceptable, such as:
<Image height="16" width="16" type="image/vnd.microsoft.icon" >http://example.com/websearch.ico</Image>.
Whilst it's nice to have the plugin file completely self-contained, Internet Explorer, even up to version 7, does not support Data:URI. However, as far as I can tell, IE does not support OpenSearch image icons at all anyway, so this point is possibly moot.

Comments

Dear Mr Chaucery

Please tell me what percentage of users are still using IE6.

This site gets 22% of visitors using IE6, 26% IE7 and 30% for all Firefox versions.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)