With Safari 5.0.1, Apple has made it easy to write browser extensions. For one of our sites, we wanted to prompt visitors to install the extension if they were running Safari. The problem is that there is no good way to query the browser to tell if the extension has been installed. It appears that there is a method for determining this but it’s reserved only for apple.com. The best way we’ve found so far is to render an element into the page if the browser is Safari >=5.0.1 then hide it with a stylesheet in the extension.
Check out the following example for displaying content based on whether or not the extension has been installed: