Forum Moderators: not2easy
The one thing I noticed is that it also validates as xhtml 1.1, if I only change the doctype. I've tried to read on this subject, but in a flood of information still too technical for me, I cannot find a simple answer.
What are practical pros and cones of xhtml 1.1 vs 1.0 and moving from text/html content to xml/xhtml? I mean what about accessibility of such documents, will I gain anything with 1.1?
Robin is right about such things (hehe in my opinion to an extent).
I say yes go ahead with it but beware of what you're getting in to! document.write is an example of JS code that won't work and there are ways of getting around all sorts of problems.
I do hope you have copies of about 20 browsers because you're going to need to test them all!
You have to serve XHTML 1.1 (and there is no strict/transitional) files with a mime of "application/xhtml+xml". This can be achieved via serverside coding. You can change a document's mime type based on the useragent. IE7 will still blow in this respect as it will not support application/xhtml+xml and therefor will remain a quirks browser as far as I'm concerned for probally years to come.
I suggest doing a search for "xhtml application/xhtml+xml" for additional reading on the topic. Once I get in to the serverside development of coding my own site for the 27th version soon I'll be dealing with this issue on a large scale! :)
[hixie.ch...]
[w3.org...]
ftp://ftp.rfc-editor.org/in-notes/rfc2119.txt
User agent could badly render XHTML page served as text/html (it's also written in article you have linked to).
Okay. Using word invalid was not good choice - it is valid but it's unrecommended.
Anyway, parsing accept-header is the best way.
XHTML 1.0 Strict served as text/html = HTML 4.01 Strict
so I decided to step down to HTML 4.01 Strict. Changing 35 pages to this format took 5 minutes, just replacing doctype, removing "xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"" from html tag and changing " />" to ">". And here I am back on earth, without the shiny tag of XHTML...
Now, will anyone convince me to spend another 5 minutes converting it back to XHTML? :))
We know IE doesn't support XHTML 1.1 (naturally though it will render it fine as text/html to the best of my knowledge) with a little serverside scripting (PHP and maybe ASP?) you can change the mimetype of the file being served based upon the useragent.
application/xhtml+xml you need to have a default of text/html and only serve application/xhtml+xml to user agents which specifically claim support - otherwise you will be blocking access to your site to a whole host of user agents which don't support application/xhtml+xml, bot least Googlebot and other search engine spiders. I don't believe SSI is powerful enough to do the job, but you can use PHP to read the
HTTP_ACCEPT string and serve the mime type appropriately. Some more reading on this topic: