You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@d-haven.org> on 2004/06/09 20:50:14 UTC

Heads up, MSIE weirdness

Just an FYI, MSIE (known for adherance to standards, yeah right) does
not behave in a rational manner when it sees the "XML" header even if
the rest of the system is HTML.  Case and point is the linotype sample
included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
because Cocoon 2.1.5 includes the header

<?xml version="1.0" encoding="ISO-8859-1" ?>

at the top, MSIE (version 6) renders it as XML.  If that header were
not there, everything would be ok.

-- 

"Programming today is a race between software engineers striving to 
build bigger and better idiot-proof programs, and the Universe trying to 
produce bigger and better idiots. So far, the Universe is winning."
                 - Rich Cook


Re: Heads up, MSIE weirdness

Posted by peter royal <pr...@pace2020.com>.
On Jun 9, 2004, at 2:50 PM, Berin Loritsch wrote:
> included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
> because Cocoon 2.1.5 includes the header
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>
> at the top, MSIE (version 6) renders it as XML.  If that header were
> not there, everything would be ok.

When MSIE has an XML header in an xhtml document, that document will 
never be rendered in standards-compliant mode, rather it will be 
rendered in quirks mode. Yet another thing to watch out for :)
-pete


Re: Heads up, MSIE weirdness

Posted by Sylvain Wallez <sy...@apache.org>.
Tony Collen wrote:

> Berin Loritsch wrote:
>
>> Tony Collen wrote:
>>
>>> Berin Loritsch wrote:
>>>
>>>> Just an FYI, MSIE (known for adherance to standards, yeah right) does
>>>> not behave in a rational manner when it sees the "XML" header even if
>>>> the rest of the system is HTML.  Case and point is the linotype sample
>>>> included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
>>>> because Cocoon 2.1.5 includes the header
>>>>
>>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>>>
>>>> at the top, MSIE (version 6) renders it as XML.  If that header were
>>>> not there, everything would be ok.
>>>>
>>>
>>> Hmm, does MSIE barf on other XHTML like this? (not served by Cocoon)
>>
>>
>>
>> Huh.  I saved it as an XML file, and then opened the .XML file, and
>> all was OK (no css styling).  The thing is, I checked it out on
>> FireFox (Mozilla's new browser), and the mime type sent from the server
>> was text/html--so that should not have been the problem.
>>
>
>
> Yep, MSIE likes to ignore mime-type headers because it thinks it knows 
> better.... which is annoying.


And there's sometime some even weirder behaviours, as when IE considers 
the mime-type, it considers it only *once* for a given URL. Which 
sometimes make it barf on malformed XML when for some (valid) reason the 
content-type of the same URL changes from XML to HTML.

> I have a friend who had this sort of problem a year ago with MSIE and 
> PDFs, mainly if the file extension is not PDF, no matter what you send 
> in headers, it will display the file as text or whatever.


Or worse, as a blank page!

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Re: Heads up, MSIE weirdness

Posted by Tony Collen <co...@umn.edu>.
Berin Loritsch wrote:
> Tony Collen wrote:
> 
>> Berin Loritsch wrote:
>>
>>> Just an FYI, MSIE (known for adherance to standards, yeah right) does
>>> not behave in a rational manner when it sees the "XML" header even if
>>> the rest of the system is HTML.  Case and point is the linotype sample
>>> included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
>>> because Cocoon 2.1.5 includes the header
>>>
>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>>
>>> at the top, MSIE (version 6) renders it as XML.  If that header were
>>> not there, everything would be ok.
>>>
>>
>> Hmm, does MSIE barf on other XHTML like this? (not served by Cocoon)
> 
> 
> Huh.  I saved it as an XML file, and then opened the .XML file, and
> all was OK (no css styling).  The thing is, I checked it out on
> FireFox (Mozilla's new browser), and the mime type sent from the server
> was text/html--so that should not have been the problem.
> 


Yep, MSIE likes to ignore mime-type headers because it thinks it knows better.... which is annoying. 
  I have a friend who had this sort of problem a year ago with MSIE and PDFs, mainly if the file 
extension is not PDF, no matter what you send in headers, it will display the file as text or 
whatever.

I tried this, thinking it would help:

     <map:match pattern="">
       <map:redirect-to uri="index.html"/>
     </map:match>

     <map:match pattern="index.html">
      <map:generate src="index.xhtml"/>
      <map:transform type="cinclude"/>
      <map:serialize/>
     </map:match>

And MSIE *still* displays xml.  This makes me really angry, in a caffeine-induced sort of way.

The problem with removing the xml declaration is that I think it will ruin any sort of xhtml 
compliance. :(

Tony


Re: Heads up, MSIE weirdness

Posted by Berin Loritsch <bl...@d-haven.org>.
Tony Collen wrote:

> Berin Loritsch wrote:
> 
>> Just an FYI, MSIE (known for adherance to standards, yeah right) does
>> not behave in a rational manner when it sees the "XML" header even if
>> the rest of the system is HTML.  Case and point is the linotype sample
>> included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
>> because Cocoon 2.1.5 includes the header
>>
>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>
>> at the top, MSIE (version 6) renders it as XML.  If that header were
>> not there, everything would be ok.
>>
> 
> Hmm, does MSIE barf on other XHTML like this? (not served by Cocoon)

Huh.  I saved it as an XML file, and then opened the .XML file, and
all was OK (no css styling).  The thing is, I checked it out on
FireFox (Mozilla's new browser), and the mime type sent from the server
was text/html--so that should not have been the problem.

-- 

"Programming today is a race between software engineers striving to 
build bigger and better idiot-proof programs, and the Universe trying to 
produce bigger and better idiots. So far, the Universe is winning."
                 - Rich Cook


Re: Heads up, MSIE weirdness

Posted by Tony Collen <co...@umn.edu>.
Berin Loritsch wrote:
> Just an FYI, MSIE (known for adherance to standards, yeah right) does
> not behave in a rational manner when it sees the "XML" header even if
> the rest of the system is HTML.  Case and point is the linotype sample
> included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
> because Cocoon 2.1.5 includes the header
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> at the top, MSIE (version 6) renders it as XML.  If that header were
> not there, everything would be ok.
> 

Hmm, does MSIE barf on other XHTML like this? (not served by Cocoon)

Tony


Re: Heads up, MSIE weirdness

Posted by Joerg Heinicke <jo...@gmx.de>.
On 09.06.2004 20:50, Berin Loritsch wrote:

> Just an FYI, MSIE (known for adherance to standards, yeah right) does
> not behave in a rational manner when it sees the "XML" header even if
> the rest of the system is HTML.  Case and point is the linotype sample
> included with Cocoon 2.1.5.  MSIE identifies it as an HTML page, but
> because Cocoon 2.1.5 includes the header
> 
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> 
> at the top, MSIE (version 6) renders it as XML.  If that header were
> not there, everything would be ok.

Yes, I already came across this and files it as bug: 
http://issues.apache.org/bugzilla/show_bug.cgi?id=29009. What's strange: 
the start page is also XHTML and it works.

Joerg