|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
you need to do it serverside,
it isn't enought just put a meta-tag in the document when the server still delivers it as text/html. to check you can use ctrl+i or right-click ->'page info' in mozilla, but as there is some browsers out there that doesn't support application/xhtml+xml (msie and k-html), you ought to use xhtml 1.0 strict instead of xhtml1.1 |
|
#17
|
|||
|
|||
|
Hmm, I tried adding this to the top of the php file:
Code:
header("content-type: application/xhtml+xml");
but then the document was parsed as an xml file. (Firefox) I just did it to test it, so it's gone now, but is this the result of the lack of support for this? If not, how do I then force the document type to something else than text/html? |
|
#18
|
|||
|
|||
|
I found a method for solving this:
Code:
$charset = "iso-8859-1";
$mime = (stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")) ? "application/xhtml+xml" : "text/html";
header("content-type:$mime;charset=$charset");
and Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> ensures that browsers supporting application/xhtml+xml will get this, while those not get text/html. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Website Critiques > http://www.bzabza.com |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|