> From: Alan Milnes
> It's in the section "Accommodating legacy browsers" and the PHP code
> is:-
>
> <?php
> if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
> header("Content-type: application/xhtml+xml");
> }
> else {
> header("Content-type: text/html");
> }
> ?>
That's not changing the META, but the actual header, which is the correct
way to do it.
> I've been happily using this believing I am serving up XHTML and now,
> thanks to your "Tools - Page Info" tip I find I am not!!
If you're using the method above, and firefox is still reporting that it's
sent as text/html, then the code is not working as it should. I use the
method above on some of my sites, and always had the desired effect.
Secondly, my reply was in relation to the original statement by Richard Czeiger:
> According to W3C, 'application/xhtml+xml' is the MIME type to use.
> I've put it pages and seen it not only validate, but also display correctly
> in IE5.0 and IE6.
Richard, I'd posit, only changed his META element, and not his headers (as
he doesn't mention anything about using any server-side changes at all - which
makes me think that he was under mistaken impression that simply changing the
META element in his html would send it with the correct MIME type).
Hope that clears this up.
Patrick
________________________________
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************