May 6, 2003

XHTML Tests

webgraphics pointed me towards a "three level XHTML test":http://www.goer.org/Journal/2003/Apr/index.html#29 Level 1 and 2? No problem. I agree. (and pass) Level 3 I have issues with. I don't agree with the Content Type at all. Not i n the very least. Why?
Level 3: The site must serve up the proper MIME-type (application/xhtml+xml) to conforming user agents. ("The MIME-type Test")
IE(Internet Explorer). It doesn't deal with application/xhtml+xml very well at all. So now you're stuck with serving alternate MIME-types on a browser base. And chances are you're hacking your CSS(Cascading Style Sheets) for different browsers as well. And if you're writing any javascript, you're probably doing some basic DOM(Document Object Model) sniffing as well, which is basically the same as browser sniffing. Can you see where this is degrading to? It seems like we're taking several steps backwards with browser sniffers and different sites for different browsers. Screw that. I'll deal with the CSS(Cascading Style Sheets) hacking. I'll deal with the different rendering engines of browsers. I'll deal with all of that. But I draw the line at MIME-types. It serves no purpose that I can see. I mean, at this point in time, there isn't a strong reason to be building XHTML(eXtensible HyperText Markup Language) sites anyways, other than for personal growth and preparing for the future. So when it becomes important, I'll switch the mime-type. But not until then. I'm freaking sick of browser-dependent changes.
Post Info

Tagged As Browsers, Coding, HTML

Comments are Open (7)

Posted at 10:20 AM

Comments

Nick Boalch

Serving the right MIME type isn't really an issue of browser sniffing.

Most (all?) browsers send HTTP_ACCEPT including a list of their supported MIME types, so you can send any browser an appropriate MIME type with only a couple of lines of preprocessor code.

Tony

Really? That I did not know.

But I still stand firm. The whole idea of having to write ANY code to determine if the browser can accept the MIME-type irrates me to no end.

Especially with this issue. I mean, seriously, what is the return for having the correct MIME-type sent? I can't think of any. (which of course, means that there is probably a million of them). I'm just sick of customizing code this way and that for browser variations. It sickens me.

Once we can get baseline browsers that accept this, I'll switch it over. Only then. And that means a while after IE 7 comes out.

Nick Boalch

http://www.hixie.ch/advocacy/xhtml discusses the possible benefits and problems of sending XHTML with correct and incorrect MIME types.

I can see your point -- it doesn't really make much difference to the end user which MIME type the page gets sent as. However, as long as you're bothering to write well-formed XHTML, it's my feeling that you might as well let the browsers that can handle it as XML rather than tag soup do so.

Tony

Okay. I see some valid points there. http://ln.hixie.ch/?start=1024005568&order=1&count=4 is where I dig most of the agreeing.

I think he's talking about XHTML 1.1 Strict, but I could be wrong.

XHTML 1.0 Transititional (which this site uses) is for the purpose of transitioning between HTML 4.01 and XHTML. That's the reason I use it, to prepare for when browsers CAN accept the correct MIME-type.

I still feel very strong about not changing my MIME-type until it's standard across browsers (IE).

Wojtek

I have read your latest entry on content type negotiation, and you rise many valid points. First of all, *should* is not *must*, second, apart from your criticism of the browser sniffing, it's not always possible to do. I, for instance, have my hands tied. My site does not reside on Apache, but IIS, and a commercial provider's to boot (Crystaltech). So even if I wanted and knew how, I can't serve Mozilla with application/xhtml+xml and the rest with text/html. It's all very well that people who maintain their servers themselves can tweak their servers, but who else in the whole world will? Nobody, that's who.

There isn't anything I can personally do to amend the situation. They say that if tag soup is to be served, why not use html 4.01. But then, why not xhtml? If there is no difference, there is no difference and I don't understand the chastising that is so popular nowadays. I have benefitted greatly from conversion to xhtml a year ago, I try to keep my code minimal and all pages validated. Good habits are priceless.

signed, frustrated,

Wojtek

.jon

You write:
"Can you see where this is degrading to? It seems like weĆ­re taking several steps backwards with browser sniffers and different sites for different browsers."

No, it is IE degrading us by not adhering to the standards.

There is sooo many hacks required just because of IE.

While I understand, that IE is the most used browser, it also is the least comfortable/powerful and degrades the web. So, it is not the fault of how XHTML needs to be served, it is the fault of IE. You should see it that way, I believe.

Also, XHTML still is very problematic.

For example, the XHTML you serve is no vaild XHTML. While browsers may play around this, XHTML needs the CSS and JavaScript to be in CDATA enclosure. This is because XHTML is really XML.

Also this XHTML you serve is not being served as such. I use Mozilla and have the HTML,XHTML and XML-accept defined, still I get it served as HTML.

So this is completely invalid. Screw that ;-)

Check out this link:

http://hixie.ch/advocacy/xhtml

.jon

Sorry ;-)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Search
Comments on this post
Categories
Info
Tony Stephens
Copyright © 1995-2005
Site Version:
10
Licensed:
Creative Commons
Validate:
XHTML, CSS, 508, RSS
Subscribe
Blog-Fu, Link-Fu