Why is Silverlight 1 broken with Firefox 3 and how do I fix it?

Firefox 3 is about to be released. There is a launch party this Sunday in the US and next Thursday in Barcelona.

The original V1 Silverlight detection script Firefox 3 has a race condition that affects the way that <object is invoked, loaded and detected. This race condition in the script has always been there but didn't occur in previous versions of the Firefox browser which meant that it remained updetected until late in the FireFox 3 development cycle.

What this means is that the forthcoming Firefox 3 release will break some Silverlight 1.0 installation experiences on web sites that use the original Silverlight 1.0 SDK Silverlight.js detection file.

The Silverlight 2 SDK has an updated Silverlight.js file that not only solves this problem for all versions of Silverlight but also eliminates browser restart that was previously needed for new installs.

You can get the SDK as part of the Install Silverlight Tools Beta 2 for Visual Studio 2008 or through the download center.

Silverlight Streaming will support hosting Silverlight 2 Beta 2 later this week.

Update: Silverlight Streaming now supports Silverlight 2 Beta 2

If you want to link to the Silverlight 2 Beta 2 Silverlight.js file hosted at Silverlight Streaming the one to use is https://agappdom.net/i/silverlight.js 

In the mean time I have uploaded just the new Silverlight 2 Beta 2 Silverlight.js detection file to skydrive.

Update: Alternatively the new Silverlight.js file that works with FF3 & Silverlight 1 & Silverlight 2B2 is now at https://code.msdn.microsoft.com/silverlightjs

Also you can now invoke Silverlight Streaming applications without using JavaScript at all. We support a URL syntax that directly names a self-contained web page with nothing but your Silverlight Streaming-hosted application.

You can use this URL as the source of an <iframe> tag to embed the application on sites that don’t allow JavaScript. Read more about this new feature in the SDK.

Piotr’s blog posts here and here also describe a technique that uses some simple javascript, to detect when Silverlight installation completes and launches the Silverlight content without any further user interaction or a browser restart.

Thanks,

Nigel