Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Suggestion: Moving Vanilla to HTML 4.01 Strict

dan39dan39 New
edited March 2007 in Vanilla 1.0 Help
I've been doing a lot of research about the backwardsness of serving xhtml web pages with a content-type of text/html which is pretty "standard" these days. Even the W3C does it. (To be clear, you need to serve xhtml pages as text/html if you want everyone to actually be able to see your site as IE6 and IE7 do not officially support xhtml and the other browsers still have some trouble with it).

I know this has been brought up before (and I actually argued against it in the past), but after reading into it more and more, I've finally realized that believing in xhtml is a bit like believing in the Easter Bunny (it turns out the Easter Bunny isn't real either).

Officially speaking, the W3C says that it is perfectly fine to serve xhtml as text/html, for backwards-compatibility purposes. But, technically speaking, all browsers just interpret this as invalid html. And, the truth of the matter is that if you were to ever start serving a typical xhtml website as application/xhtml+xml it would likely fail.

If you're familiar with this subject you'll know that the Ian Hixie article is sort of the alarmist version that everyone cites who argues against xhtml.

However, I have found that this Webkit article is a much better read on the subject. I highly recommend that anyone who has an opinion on this matter read this post first:

Understanding HTML, XML and XHTML

Essentially, what you will realize after reading it is that by writing your pages as xhtml and serving them as text/html you're basically having the browsers parse the xhtml as invalid html — which sort of defeats the purpose of writing valid xhtml in the first place.

You'll also find similar documents from Mozilla here:

http://www.mozilla.org/docs/web-developer/faq.html

...and here are some comments from developers who have also recognized the shortcomings of xhtml and switched back to html:

http://www.elementary-group-standards.com/html/why-do-you-use-html-4.html

We all know that it's very easy to create an HTML Theme for Vanilla, and in the short-term, it's perfectly fine for Vanilla to be xhtml served as text/html — after all, every browser "supports" this model. And, anyone who wants to move to HTML can easily do so with a few minutes of work.

But, I think in the long-term, HTML 5 is going to be more widely adopted than XHTML (especially since XHTML 1.1 and XHTML 2.0 are not backwards compatible in any way, not even with each other!). Therefore, I'd like to recommend (to Mark) that in the long-term, Vanilla 1.5 (or 2.0) be moved to HTML 4.01 Strict.

Please discuss...

Comments

  • Options
    Nice post. However, I don't think any markup language will ever be "standard". What I mean is: as long as there are different clients (read browsers) there will always be issues with the interpreting. Don't understand me wrong here... I love standarization, but as long as people are individuals, there will be differences. Ah.. wouldn't you love to be part of the BORG? :P
  • Options
    dan39dan39 New
    edited March 2007
    I agree completely. But, I'm coming to realize that there are too many issues with "true" xhtml in the long term for it to be sustainable for sites that are engineered for public consumption. So, I really do think that HTML 5 will be much more promising than xhtml in the long run. And moving Vanilla to HTML 4.01, way before HTML 5 becomes a reality, will help developers make that transition. Of course, any "transition" would be years away, so it's not like this is an urgent matter that needs to be addressed right this second. But, it is something that should be kept in mind.
  • Options
    thanks this was informative :)
  • Options
    edited March 2007
    i always thought that xhtml is the best because its extensible, meaning the pages could be viewed easily on mobile devices and projectors.. plus its pure xml (if its valid).. well, im not good in technical aspects of browsers, so... personally, what is strange for me is, how can there be an open tag in html, and no clos tag? like this?
    <br> or <img src="1.1" alt="one">... although i have a master certificate in html 4 from brainbench, i still think it sucks.... thats my subjective opinion.
  • Options
    dan39dan39 New
    edited March 2007
    In theory, XHTML was born from that idea. Accoring to Wikipedia: "The need for a more strict version of HTML was felt primarily because World Wide Web content now needs to be delivered to many devices (like mobile devices) apart from traditional computers, where extra resources cannot be devoted to support the additional complexity of HTML syntax".

    However, by definition, XHTML Basic and XHTML Mobile Profile are best for those types of devices.

    But remember, the major problem is that if you serve your XHTML markup to a mobile phone at text/html, it's still the same as sending it invalid HTML. And unfortunately, serving your xhtml pages as application/xhtml+xml (as it was intended) is a lot more trouble than you might think... Apparently in a "true" xhtml setup (where xhtml is served as application/xhtml+xml), having an improperly escaped ampersand in a URL would cause an entire page to fair for the end user. Clearly, that's not and ideal path for most web developers.
  • Options
    Resistance is futile.

    Couldn't resist.
This discussion has been closed.