
Browser Support for XHTML? 73
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?
Backward Compatability (Score:4, Insightful)
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!
Re:Backward Compatability (Score:5, Informative)
We also serve the pages as application/xhtml+xml to mozilla and other gecko based browsers. If you send that to IE it won't work. I think it just prints out the XHTML instead of rendering it. But, if you send the same data as text/html it works fine. If only IE would support transparent PNG images.
I think the best bet is drop support for Netscape 4.x. When I say drop support, I mean, make sure that the content of the site is still accessible even if NN4 users lose a little bit of the layout, it pays off with the benefits of CSS and XHTML.
Just my 2 cents.
Re:Backward Compatability (Score:4, Informative)
The only mime-type you should serve XHTML 1.1 as is application/xhtml+xml. If you serve it as text/html, you are violating the spec. The only type of XHTML you are allowed to serve as text/html is XHTML 1.0 that follows Appendix C of the XHTML 1.0 Recommendation.
Also, when you serve it as text/html, the only thing browsers see is tag soup - they don't treat it as XHTML, just run-of-the-mill HTML that doesn't quite match HTML 4.01.
Re:Backward Compatability (Score:1)
What to do, you can see by all the discussion here, that even when you follow standards, to get the most out of your efforts you have probably end up doing non standard things to trick the non standard compliant browsers into behaving in a standard type way.
It's a vicious cycle. But still, these days, there are far more benefits to being as standard compliant as possible
I think this is a legitimate strategy to serve documents in a correct manner because of browser bugs, especially as it is controlled
Re:Backward Compatability (Score:2)
Alternately, what makes XHTML 1.0 so special that it is allowed to be sent as text/html? After all, there are situations where XHTML treated as tag soup means something different to the HTML equivelant.
But of course we will. There won't be a n
Re:Backward Compatability (Score:1)
This was all taken from Mark Pilgri
Re:Backward Compatability (Score:2)
No, it is actually breaking the spec. You (and Mark) are referring to an unofficial Note produced by a member of the W3C. A quote from that document:
I am referring to RFC 2854 [ietf.org]. This RFC provides the list of document types
Re:Backward Compatability (Score:2)
If only IE would support transparent PNG images.
It does, in indexed mode (aka PNG8).
In The Gimp, create a new image with Fill Type set to transparant. Right-click the image, "Image", "Mode", "Indexed". Save as PNG. Bingo, PNG with transparency that work in IE.
More precisely, IE does not support the alpha channel of PNG.
Re:Backward Compatability (Score:5, Interesting)
I think you're partially misinformed. XHTML will work in pretty much everything in existance. CSS, OTOH, is another story.
Are we talking about content or design here?
Because a number of sites (like this very popular one, Wired.com [wired.com]) use XHTML quite effectively with all known browsers. Sure, some browsers like Netscape Navigator will not render the design but all of the content is still accessible. Hell, I can even browse the thing in Lynx!
So, I think the better question is: can the browsers display the content? And the answer is yes. Can they display all the new wiz-bang CSS layout stuff? The answer is probably. (Given that about 98% of the market is browsers that can.) Remember, it's far more important that your content is logically structured and accessible (which is what XHTML does) than it is that it looks classy (CSS).
Re:Backward Compatability / Forward Compatability (Score:1)
You may loose your normal view of page layout formatting, but if you structure your XHTML Strict logically, it will still be a readable and navigateable document.
If you structure your document well, with Strict DTD, you can apply different CSS to different media, and it takes very little editing and effort to do so.
You can create printer friendly pages, mobile device pages, etc CSS, from exactly the same XHTML markup by applying different styles and displaying or hiding different sections.
This also
Re:Backward Compatability (Score:2)
If all the people out there would just grow some balls and future proof their sites by implementing modern standards now, the sooner this problem will go away. A little "Your browser sucks, download Mozilla" won't hurt anyone. Then delete iexplore.exe to make them use Moz... nobody will miss the popups.
Re:Backward Compatability (Score:2)
Sometimes you just have to code for what's out there. Try to change the world along the way, but realize that you're not going to convince everyone right away. There are ways to design for the standards and achieve backwards compatability at the same time.
OT: Nitpicking a phrase (Score:2)
I see this phrase a lot, and nine times out of ten, the writer should be saying, "the higest common factor."
You're likely coding for the *most* features supported by all of the browsers, i.e., the largest set of supported HTML features. For example , the lowest common denomintor would be something like HTML 1 or 2; the highest common factor is likely HTML 3.2
XHTML test suite (Score:5, Informative)
no problems here... (Score:5, Informative)
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?
Re:no problems here... (Score:3, Informative)
There are problems with including the XML declaration/PIs in documents that you later serve as text/html, outlined in Appendix C of the XHTML 1.0 Recommendation. For instance, Pocket IE renders them as content.
Re:no problems here... (Score:2)
Pocket IE just plain sucks. Hopefully the new "Windows Mobile" Pocket IE has addressed this issue.
Need a jump start?? (Score:5, Informative)
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.
Moz been left out (Score:4, Informative)
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. [mozilla.org]
cliff: the chart is lousy. (Score:4, Insightful)
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!
Re:cliff: the chart is lousy. (Score:4, Informative)
Try this one [macedition.com].
Re:cliff: the chart is lousy. (Score:1)
That addresses CSS, but not HTML markup or programming the DOM, which put together unfortunately makes a Matrix so vast that even Neo couldn't master the knowledgebase
.Thoughts on IE and Moz (Score:2)
IE handles XML+XSLT+CSS pretty well, certainly in version 6.
Mozilla's support would be OK, but it suffers from the same overly nitpicky irritation as it does with HTML+CSS: it stubbornly refuses to acknowledge that a file could possibly be XML or whatever unless the MIME type is correct. Given that even fewer servers, particularly those run by ISPs for their personal subscribers rather than run by companies for themselves, get the MIME type right for X* than they do for HTML+CSS, Moz is out of the race as
Re:Thoughts on IE and Moz (Score:1, Informative)
Re:Thoughts on IE and Moz (Score:2)
Unfortunately, you are in a tiny minority. The vast majority of web sites I've seen trying to deliver XML content but sending it with a text/plain MIME type wanted it interpreted as XML.
By all means leave the standard compliant interpretation in Moz, but at least provide an override to deal with the vast majority of cases where it's a simple error on the part of the server administrator (who frequently has nothing
Re:Thoughts on IE and Moz (Score:2)
Re:Thoughts on IE and Moz (Score:5, Insightful)
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?
Re:Thoughts on IE and Moz (Score:2)
And that makes what, 10% of the end user market between all of them? That's probably generous.
Yes, I'm getting a substandard service. And
Re:Thoughts on IE and Moz (Score:2)
Err, no. That is one mechanism, and probably the most convenient from your perspective, but it is by no means the only mechanism.
Because there are no file extensions in URLs. A period is just a period. Who cares what mechanism you use - unless you are assuming that everybody uses the same mechanism as you, which is just plain wron
Re:viruses (Score:2)
I disagree. I think it's a poorly thought out security policy that runs executable code without proper checks that has done that. The fact that the flaw was in how MIME types were handled is coincidental. There are no MIME types in propagating a Word macro virus, but the underlying problem is the same.
Re:viruses (Score:2)
That's just covering up a symptom of the underlying problem. Why do applications like web browsers, word processors and spreadsheets need the ability to run code, and automatically at that, when that code can damage the data on my computer?
Re:viruses (Score:2)
You can't blame the end users for the sort of screw-ups we're talking about. There is little need for any web browser or word processor to provide scripting facilities that can affect data on my hard drive anyway. Even if the facilities are there, the problem is that "autoexec" scripts for WP documents, or automatically rendering HTML e-mail as if it were a web page, scripts included, allow the end u
Re:Thoughts on IE and Moz-A $ for your principles. (Score:2)
It is entirely the point. Compatibility with existing software, particularly such dominant software as IE, is vital to any competitor that hopes to go anywhere. Can you name a single widely-used and successful product that has taken the crown in its field from an incumbent market leader without being compatible with it?
Re:Thoughts on IE and Moz (Score:1)
Have you tried using an
AddType application/xhtml+xml xhtml
and variants may help. I haven't tried this myself though, as I'm quite comfortable serving up xhtml as html-lookalike 8-)
Re:Thoughts on IE and Moz (Score:1)
It would be nice to have one XHTML file on disk that would be served as application/xhtml+xml to clients that Accept it and as text/html to the others. Guess that could be done with mod_rewrite. However, you'd also need not to include the <?xml ... ?> declaration and processing instructions in that case, and for that you'd already need content handler (assuming Apache) that would work on the data in the stream, not just the meta information.
Just switching everything to application/xhtml+xml will
Re:Thoughts on IE and Moz (Score:1)
You don't need to worry about the <?xml
Re:Why I gave up on XHTML for now (Score:2)
What? XHTML served as text/html validates just fine.
Compliance and awareness (Score:2)
I think you answered your own question. As you point out, support for XHTML is "vague". That's another way of saying that compliance is very bad.
Question: What's the problem XHTML is supposed to solve? Answer: the fact that too much web content only works correctly on a particular browser. (And often at a particular resolution!) XHTML does this by re-introduci
Re:Compliance and awareness (Score:5, Informative)
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.
Cruft and slop (Score:2)
Re:Compliance and awareness (Score:1)
Re:Compliance and awareness (Score:2)
some of my experiences (Score:5, Informative)
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.
Re:some of my experiences (Score:2, Informative)
if you load an external stylesheet using the @import command, NN4 doesn't know what you're on about and ignores the stylesheet altogether.
Re:some of my experiences (Score:2)
Re:some of my experiences (Score:1)
Re:some of my experiences (Score:1)
if you load an external stylesheet using the @import command, NN4 doesn't know what you're on about and ignores the stylesheet altogether.
A very handy hack for dealing with NN4, but don't forget that it works on all level 4 browsers.
Also worth remembering that NN4 can deal with some CSS, so use it and have a gracefully degrading web page that doesn't lock out the people who are stuck with crappy browsers.
Warning: Google (Score:3, Informative)
Google will not correctly index pages sent as text/xml: it will simply write "File format: unrecognized", even with the proper !DOCTYPE, even with the html tag
MSIE has this nasty problem with the XHTML1.1 doctype, gives an error. Documents should be sent as text/html too. I guess it won't be fixed in the standalone version which is now to be discarded by Microsoft.
The best way I've found to make browsers digest the HTML entities (we're not all using 7-bit clean languages!) is to never use entities, use plainly the numerical code.
Apart from that, Mozilla is a great platform for XHTML, and even MathML and SVG (if your build has that enabled). So the modular nature of XHTML is becoming more and more useful
You must be careful with javascript in Mozilla too... old tricks a la document.write won't work; you have to do it the 'right way': through the DOM. And SGML comments wrapping STYLE and SCRIPT sections must be enclosed in proper CDATA marks.
For those who complain that CSS is too complicated, it's just a matter of knowing, not understanding. The only thing you have to understand is that some elements are blocks, others are lines. All is declarative, there's not even a for loop or an if to confuse you
To conclude, yes, XHTML is the right way, but you have to polish it, like you'd do in other real programming languages. It's not for Aunt Sally anymore!
Re:Warning: Google (Score:1)
Article at xml.com... (Score:3, Informative)
http://www.xml.com/pub/a/2003/03/19/dive-into-xml
-h3
Re:Article at xml.com... (Score:2)
ISO HTML (Score:1)
Marketshare (Score:2)
This isn't a troll. I browse with either Safari [apple.com] or a Mozilla [mozilla.org] derivative [mozilla.org], and use xhtml+css whenever I have to make a web page. That being said, if marketshare is the driving factor, then there's only one answer: MSIE for Windows. If you check out, say, Google's Zeitgeist survey [google.com], it's clear that the overwhelming majority of web surfers use MSIE, and that's what you have to cater too. Unfortunately for the rest of us.
I use XHTML 1.1 Strict (Score:1)
The only problem as I see it, is that XHTML 1.1 and CSS isn't always good. Just a simple thing such as aligning text & images in the center of a div means that I need to resort to tables since <cen
Re:I use XHTML 1.1 Strict (Score:2)
The text-align property applies to inline elements, including inline replaced elements such as images. That is all you need, and pretty much all browsers that support CSS understand this.
Internet Explorer has problems relating
XHTML media type test (Score:1)
XML UTF-8 support (Score:1)
No browser on Mac (I did not check iCab) are able to support UTF-8 as an XML declaration
Actually, I have to add an HTML declaration
Removing it will make my pages appear "hieroglyphic". So I conclude it is not supported yet. What about IE6?
I don't trust him one bit... (Score:1)