W3C home > Mailing lists > Public > www-html-editor@w3.org > January to March 2006

Re: Question about XHTML 2.0 and content type

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 02 Feb 2006 13:46:17 +1100
Message-ID: <43E17279.40705@lachy.id.au>
To: magick <jasper.magick@gmail.com>
CC: www-html-editor@w3.org

magick wrote:
> Will XHTML 2.0 *have* to be sent as "application/xhtml+xml" (or one of 
> the other XML content types) or will it be allowed to be sent as 
> "text/html"?

No, absolutely not.  Just like XHTML 1.0, it must not use text/html. 
(note: Appendix C does provide some guidelines for use as text/html, but 
this is widely criticised and serving XHTML as text/html under any 
circumstances is generally considered wrong)

> The main reason I'm asking this, is because after doing some tests I 
> realized that Google Adsense will not display on any page sending out 
> "application/xhtml+xml" as the content type.  Which would mean loss of 
> revune.
> I'm very interested in using XHTML 2.0 when it is finished and a doctype 
> is made for it, but I'd prefer to use "text/html" if I can.

So, your reason for wanting to use a future markup language by serving 
it wrongly is that current UAs don't support XHTML yet?  Well, don't you 
think that by the time XHTML 2 becomes a recommendation, that such UAs 
will have been updated?

Besides, XHTML 2 isn't even backwards compatible with XHTML 1.0 UAs, 
since all the elements are in a different namespace and thus have 
different semantics.  So even if Google and IE started supporting 
application/xhtml+xml tomorrow, they still wouldn't support XHTML 2 for 
a very long time.

If you want to use text/html, just use HTML 4.01.  Using any form of 
XHTML and lying about its content type won't have any advantages at all, 
it's just a waste of time.

Lachlan Hunt
Received on Thursday, 2 February 2006 02:46:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:54 UTC