June 17, 2007

Safari on Windows...


Safari on Windows is a nightmare for web developers. I am not even speaking to the bugs, or the 'windowsisms' it doesn't do, or any of the other bitching people have done on the topic.

Safari on Windows is bad for web developers just because it has the potential to add a 5th major browser. Right now when you do serious web development, you have to be concerned with how it works in IE6, IE7, FF2 and FF1.5. There are non trivial differences between all 4, and something working in one does not guarantee it will work in any others. Generally FF2 and FF1.5 work pretty closely, but I have been bitten by thinking they work the same too many times to not check.

I know many people feel that Safari is 'standards compliant' and it will work anywhere that FF2 does, so it isn't an additional burden to maintain, but that is just not the case.

I just spent 3 hours yesterday looking at a very heinous safari bug where even accessing the document of a window that was loaded from an external domain caused safari to disappear all the iframes on the page, so simple code that did:

for (var i = 0; i < targetWindow.frames.length; i++) { try { var doc = targetWindow.frames[i].document; // do something with the document. } catch (e) { /* cross domain iframes fail here, but thats ok */ } }

That code, while failing properly on firefox, or ie (any versions) with cross domain iframes, causes all iframes in safari to disappear and not be rendered.

I am looking forward to dealing with more and more of these issues if safari gets enough market share to be something I have to support. *ugh*

Posted by tberman at 10:34 AM | Comments (0)