Re: XHTML as XML

Anne van Kesteren asked:

What method are you using to give Google XML instead of HTML? Are you 
making an exception for Internet Explorer or are you serving 
'application/xhtml+xml' to everyone?

--------------------------------------------


1) First I test if an http accept-header exists. If it does not, as is
the case of Google, I use XHTML 1.1 and mime-type application/xhtml+xml
and I include the xml declaration at the top of the document.

2) If an http accept-header exists, I test if it contains the string
"application/xhtml+xml". If it does, as is the case for Mozilla/Firefox,
Opera, Amaya, etc. I use XHTML 1.1 and mime-type application/xhtml+xml
and I include the xml declaration at the top of the document (same as
case 1).

3) If "application/xhtml+xml" is not found in the http accept-header, as
is the case of IE at the moment, I serve the file as XHTML 1.0 Strict
and use mime-type text/html and I don't use the xml declaration. Also in
this case I add a meta tag: <meta http-equiv="Content-Type"
content="text/html; charset=utf-8"> to the document.

Best regards,
Jesper Tverskov


-----Oprindelig meddelelse-----
Fra: Anne van Kesteren [mailto:fora@annevankesteren.nl] 
Sendt: 10. februar 2005 12:19
Til: Jesper Tverskov
Emne: Re: XHTML as XML

Jesper Tverskov wrote:
> I consider the above statement for not relevant. I have been serving
> XHTML 1.1 as xml to Google for almost two months now, and Google is in
> love with my web pages. Hundreds of people are arriving to my website
> from Google every day. I keep track of each visitor, and log the
search
> terms they are using.

What method are you using to give Google XML instead of HTML? Are you 
making an exception for Internet Explorer or are you serving 
'application/xhtml+xml' to everyone?


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>

Received on Thursday, 10 February 2005 11:54:18 UTC