On Jul 3, 2007, at 6:38 AM, Alan Gresley wrote:
>
> I will dare say that xml doctypes, mime types and parsing seem to  
> confuse people more than it does IE6.

Indeed :-)

However, note that Internet Explorer (any version) doesn't understand  
correctly served xhtml, so we have to serve xhtml as 'text/html' for  
the time being -- if we want it to work.

> http://www.gunlaug.no/contents/wd_1_06_03.html

The above page is duplicated -- 6 versions -- so one can test across  
browser-land and see how each browser handles it with different MIME  
types and with flaws in the source code.

> Remember that browsers usually show xhtml or html in standard mode  
> (or almost standard mode) with a URI or quirksmode without a URI.  
> There was a good page on Georg's site about why he likes to send  
> IE6 into quirksmode with the xml prolog, but I can not find it now.

It's here...

<http://www.gunlaug.no/contents/wd_additions_16.html>

... and I haven't found a good reason to change my mind on the  
subject. I find it easier and less "hacky" to get a reasonably good  
styling through to IE6 when it's in quirks mode, than having to deal  
with its "not very standard compliant mode"

> http://www.gunlaug.no/
>
> I still have a lot to learn myself since some pages on Georg's site  
> don't even have a mime type. Very confusing indeed.

Shouldn't be all that confusing, really. It's according to standards,  
and I'll expand slightly on it here since it may affect how our CSS  
is working.

All my pages are sent with a MIME type -- by the server. Browsers  
don't need the information in the meta element, since they get the  
information in the header sent by a properly set up server. The  
server usually takes its information from the 'html/xhtml/xml'  
extension, so the meta element isn't used by the server either. If a  
server doesn't serve up the correct/wanted MIME type, the that's  
dealt with in the set-up for that particular server.

The meta element is only of some use when testing locally -- on our  
own computers, and for the W3C HTML validator. Since I use an 'xml  
declaration' on top, I don't even need the meta element for that.

What one preferably should do when preparing to serve xhtml as 'text/ 
html' -- which is what most of us do all the time, is to start by  
serving, and testing, our work as 'application xhtml+xml' and make it  
work in all browsers that understand that MIME type. Once that's  
working perfectly well, we can change MIME type to 'text/html' and  
give IE/win (and the rendering in other browsers) some attention.  
Doing it in this order is a quick way to create pretty future-proof  
web solutions, and we don't even need to check the validity of our  
source code all that much, since the good browsers will immediately  
inform us about any flaws -- there's no "error recovery" for properly  
served xhtml. I find this procedure to be a time-saver, as it reduces  
the amount of testing and use of on-line and off-line test-tools and  
validators.

IMPORTANT: NOTE that our CSS (and javascript) may not work as  
intended for properly served xhtml. A few details are handled  
differently, so a bit of MIME type switching and testing is required  
if one wants to use xhtml 1.0 -- regardless of how the final version  
is served. If one can't, or won't, do the necessary MIME type  
testing, then it's better to stick to HTML 4.01 where we only have to  
deal with 'text/html' anyway -- for ever.

regards
        Georg (still on vacation :-) )
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to