Browser Support for XHTML?
eLoco asks: "What support do today's browsers have for XHTML? Maybe a better question would be: what support do the major browsers in current use have for formatting/display of XML with DTD defined? I don't have any browser prejudice per se (I use MSIE, Mozilla, Safari/KHTML, and Opera depending on the system I am working on and my mood), but I am primarily interested in the browsers with greater 'market share,' since my main reason for asking is this: If at least the "main" browsers in current use have decent support (vague, I know) for XHTML/XML rendering, why haven't we all converted over yet?" While it doesn't cover all browsers out there, this chart serves as a good starting point. For those of you working with application/xhtml+xml files, what issues have you run into when serving up your files to various browsers?
If you're on a controlled intranet or something similar and can control the browser used, your set, but I wish the real world was like that.
This is one reason that I love templates thou, I have a work in progress template for my main site that is XHTML strict, so browsers that support it can have it.
Enjoy!
On Arrakis: early worm gets the bird. Magister mundi sum!
is right here! Seeing how you have all these browsers, run them against this suite, and see how they faire. Nothing like the fresh scent of google.
__________
Love conquers all... except CANCER
I've been using XHTML for all of my web developement for quite some time now. And in XHTML 1.0 Strict, mind you. Just stay away from using tables for layout and use CSS to accomplish your formatting and you'll be fine.
The only quirk I ran in to was the new IE 6 "standards compliance mode" which should be rename "less-messed-up mode". While it fixes some bugs, it created new ones. To avoid developing for IE6's new quirks and to keep my documents compliant by having the !DOCTYPE declaration in there, I add the ?xml... declaration to the top of my files to kick IE back in to its 5.5ish quirky existance.
Of course, IE still doesn't support the object tag correctly but will they ever?
Check out http://www.meyerweb.com/eric/css/edge/.
Author of Cascading Style Sheets: The Definitive Guide. Or http://bluerobot.com/web/layouts/
Both sites offer ready to go, CSS ideas that make moving to XHTML an absolute breeze. And the older browsers (including Netscape) have been covered.
Excellent resource.
It seems that the chart linked to has no mentions of Mozilla/Netscape 7, which imo probably has the best support for the widest range of standards. Here's a page detailing the various XML stuff Mozilla supports.
The chart you supplied is lousy. Either it's vastly out of date, or it's deliberately slanted against non-IE browsers.
For one, it simply lists an x for what is apparently full support, an (s) for somewhat supported, and nothing for no support. This is a terrible way of comparing things, since different browsers have different levels of support and different bugs in their implementation. CSS2 support is notoriously problematic, iirc. Not to mention that having "DHTML" and "JavaScript" support categories after this x/(s)/ fashion is fairly ludicrous. What about the various W3C CSS and DOM levels, and even the various components within DOM level 2?
But the most blatant problem with the table is the fact that it covers Internet Explorer 6, Netscape 6, Netscape 4, and Opera 3.02(!), amongst others. While IE6 is current, NS4 and Opera 3.02 certainly are not! Not to mention that NS7, while quite nice, is lacking a lot from the cutting-edge Mozilla 1.3 and 1.4 versions.
Anyone have a better comparison chart? Please post 'em below!
--
Given enough personal experience, all stereotypes are shallow.
Stubborn? It's a required part of the HTTP specification. Every browser other than Internet Explorer gets this right.
Granted, there are a few wonky servers out there, but they aren't anywhere near as widespread as you make out. If the server you are on is serving your files incorrectly, and you cannot fix this yourself, then complain. You are getting a substandard service.
If Mozilla and other browsers do the exact opposite of what the public specifications require, and instead blindly copy Internet Explorer, then they have essentially given control of that specification to Microsoft. How can this be a good thing?
This is untrue. XHTML 1.0 (the only XHTML viable to the public web) is a direct translation from the SGML-based HTML 4.01. As such, it comes in three flavours:
Later XHTML specifications build on XHTML Strict, but you can't use any of them with Internet Explorer without violating RFC 2854.
I try to make valid XHTML 1.0 strict pages. Of course if you turn your back for a second it is easy to let some none standard stuff slip in. But on the whole my sites should (mostly) validate as xhtml 1.0 strict.
The nice thing about XHTML is that it is really straightforward to maintain. It's HTML the way it is supposed to be. If you don't use CSS to style it, it probably renders something usefull in any browser in use today. The problem is that you need to use CSS to provide layout and that no browser fully supports the CSS standards correctly. Mozilla does a nice job but does have many known bugs if you try to do some more exotic stuff. Internet explorer comes along nicely, as long as you avoid specific constructions. Opera and KHTML probably don't do a bad job either but I don't test for those.
Overall I am positive about XHTML. I deliberately do not support netscape 4 (the handfull of users of that product have plenty of alternatives) and that does make life easier. If only it didn't try to interpret the CSS!
The only downside of XHTML is that you have to use CSS, which IMHO is a very flawed language for what it's supposed to do. It is way too complex and that is also the reason why there is currently no fully compliant implementation available. In addition it is awfully limited in what it can do. It can be very frustrating to get very basic designs implemented in CSS. E.g. there is no obvious, clean way to get a status bar below three variable height columns. There's several dirty ways of doing it, though.
Annoyingly, Internet Explorer always manages not to support features you absolutely need to get an elegant design working in it (this is not a problem with CSS of course). Really the only reason people resort to javascript for making menus is internet explorer's lack of support for CSS. You can do collapsible, nested menus with just a handfull of straightforward lines of CSS.
Mozilla does a lot better and you are unlikely to run into bugs unless you really know your way around CSS. Typically the stuff that doesn't work requires a CSS expert to explain to mere mortals what it was supposed to do in the first place.
I recently browsed through the CSS3 specs and I really hope to see some good implementations of it soon. It solves a lot of problems. Unfortunately I am very pessimistic about seeing any compliant implementations of it in wide use in the near future.
Lately I have been giving some thought to doing mozilla only designs. It would make life much more pleasant. Unfortunately over 80% of my visitors are stuck with internet explorer.
Jilles