Virtual X(I)
A few days ago I read XHTML, what is the
point?. Later that day, someone pointed me to Sending XHTML as text/html
considered harmful by Ian Hickson. Especially the last article goes in
great detail about why you shouldn't send xhtml pages with mime type text/html.
Usually I do not respond to such articles, but this one is very well-written and a lot of points Ian makes are absolutely valid. I still do not listen to this expert and serve my XHTMl pages as text/html, so therefore I feel the need to explain the reasoning behind this situation further in this entry.
- I will not be hurt if I switch the content type and things go bad; this is my own responsibilty.
- Escaping the <script> and <style> tags is my own responsibility. I do not mind doing this. In fact I find correcting these kind of errors later on minor work compared to totally re-writing from HTML 4.01 to XHTML.
- The standard allows sending XHTML/Transitional as text/html.
- I do understand that my stylesheet (and especially the body tag) is handled wrong when send as text/html.
- The points about DOM-scripts and document.write() are not applicable to my site. I consider both bad scripting style anyway.
- Yep, it does suck that despite delivering clean XML, the browser still has to parse the more difficult tag soup. I believe that if I start writing valid XML right now, (as should everyone) the switch will be easier later on, when ie7 works good and nobody uses older browsers anymore ;-). And yes, you could do this in HTML 4.01 too, but then existing validators do not push you enough to write validating xml.
- Browser writers _have_ to accept the / > tag as the ending delimiter of a html tag, instead of > /. I do understand that browser developers hate this, but there are worse problems with parsing tag soup and internet explorer.... This is just inescapable in a world with 90% ie-users.
In fact the problem is (again) the never updated version of internet explorer, otherwise everybody could happily send application/xhtml+xml for all xhtml pages.
Later that day: Because I had a laptop with ms windows available this weekend I could test the site in iexplore.exe and decided to make the jump now and changed the site to XHTML 1.1 and UTF-8 anyway. It is served properly to browsers that support application/xhtml+xml, others are on their own...
So (with the proper fonts installed), you can enjoy: Ù Ù Ù Û ØªÙØ§Ù٠بدÙÙÙ Ø§ØØ³Ø§Ø³ درد Ø´ÙØ´Ù Ø¨Ø®ÙØ±Ù
[Permalink]-- Filed under: [linux] [web]

