[whatwg] Style sheet loading and parsing (over HTTP)

Julian Reschke julian.reschke at gmx.de
Tue May 22 02:00:58 PDT 2007


Anne van Kesteren wrote:
> For compatibility with the web it seems important to simply ignore 
> Content-Type in all modes. Firefox has some hack where they "respect" 
> Content-Type in standards mode except when the response Content-Type 
> doesn't contain a "/" or "\". For instance
> 
>   Content-Type: "null"
> 
> would be applied. Internet Explorer doesn't respect Content-Type at all 
> either. However, it does respect HTTP status codes. So redirects are 
> followed and responses with status codes that indicate some type of 
> error (404, 410, 501, etc.) are not parsed as style sheets. Anything 
> that ends up with a status code of 200 that is fetched from a "style 
> sheet loader" (<link rel=stylesheet>, @import) is parsed and applied.
> 
> It would be nice if the specification said something along those lines.

So are you seriously suggesting to document behavior that is a against 
what the W3C TAG recommends?

See <http://www.w3.org/2001/tag/doc/mime-respect.html>.

<irony>
That page says "Latest version: 
http://www.w3.org/2001/tag/doc/mime-respect". I follow that link with 
Firefox 2.0, which gets me XML content, with a reference to an XSLT at 
<http://www.w3.org/2001/tag/doc/versioning.xsl>, but *that* one is 
served with media type "text/html", so Firefox is refusing to apply it 
("Error loading stylesheet: An XSLT stylesheet does not have an XML 
mimetype"). Good.
</irony>

Best regards, Julian




More information about the whatwg mailing list