Via Weblog about Markup & Style:

Dive Into Mark provides an excellent example of why a browser shouldn’t second-guess file types.

Safari content sniffing for XHTML

It’s a screenshot of Safari looking at a text document… but the first line mentions XHTML, so it’s decided that’s what it must be. I’ve had lots of trouble with Internet Explorer doing the same thing, and Safari’s been aiming at bug-for-bug compatibility in order to “break” as few sites as possible.

[Edit: After the source blog was taken down, I grabbed the screenshot from archive.org and uploaded it here.)

The new beta of OmniWeb uses Apple’s WebCore, the Konqueror-based code used to display pages in Safari.

What makes this so interesting is that OmniWeb was the first web browser designed to really work with OS X. IIRC MS really didn’t do much to IE except add the compatibility code and change the icons.

A lot has been going on in the web browser world over the last year and a half. Sure, the Browser War has been declared over, sure, Netscape has been declared dead time and time again, but IE has been stagnating ever since it “won.” Except for bug fixes, Microsoft hasn’t released a new version of IE for the Mac in over three years, or for Windows in almost two. They’ve declared they won’t be continuing IE on the Mac at all, and there’s talk of tying future Windows versions directly to the operating system, so that you can’t upgrade IE without upgrading Windows.

With the free availability of Gecko, the rendering engine that Mozilla and Netscape use to display pages, projects to develop web browers were springing up everywhere. People were trying out crazy new ideas like tabbed browsing (not the same thing as MDI), which proved popular enough it ended up back in Mozilla, where it became the most popular feature. Now every major browser but IE has it.

Now, the same thing looks to be happening with KHTML. What started out as a way for the KDE file manager to display web pages has become a very nice web browser, and since (like Gecko) it is available under an open source license, anyone is free to develop their own browser around it. Apple built Safari on top of it, making improvements where necessary, and made it easier for other Mac applications to use the same code. OmniWeb brings the number of KHTML browsers to at least three, and I suspect more will follow.

IE will probably continue to rule the statistics as long as Microsoft controls both it and Windows, and as long as Windows remains dominant on the desktop. But the innovation has moved elsewhere, and there are at least three other major browser types out there (Gecko-based, KHTML-based, and Opera) that can display pages very well, thank you.

With luck, this may begin moving us back to a platform-neutral Web, as it was originally intended.