Closed Bug 539910 Opened 15 years ago Closed 15 years ago

"type" attribute of "link" tag is ignored (crosspost by OP from http://code.google.com/p/chromium/issues/detail?id=32045)

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ropi, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20 (.NET CLR 3.5.30729) Stylesheet is ignored upon not having ".css" extension (more correctly, if its extension is not registered with the webserver as text/css). What the heck we have "type" attribute for "link" tag if only IE uses it. I believe, for data fetched over "link" tags, response header "content-type" MUST be ignored if (and only if) response code is 200 OK. Reproducible: Always Steps to Reproduce: 1. rename any stylesheet to a different extension (php or unassigned, does not matter) 2. change the "link" tag in the corresponding HTML (or PHP or whatever) document 3. try to load the page (from http server only, filesystems rarely have HTTP response headers) Actual Results: CSS ignored. content-type from HTTP response header overrides explicitly specified "MIME" type. ([OFFTOPIC ON] this multibullshit-based acronym with its full form should really be retired nowadays[OFFTOPIC OFF]) Expected Results: Nothing (e.g. should make no sense). read http://code.google.com/p/chromium/issues/detail?id=32045 for original discussion
Component: File Handling → Style System (CSS)
QA Contact: file-handling → style-system
In standards mode, the type attribute is meant to be used solely as a hint and the Content-Type returned by the server is treated as authoritative[1]. A non-text/css type from the server will only be considered valid in quirks mode[2]. [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#attr-link-type [2] http://en.wikipedia.org/wiki/Quirks_mode#Triggering_different_rendering_modes
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Shall this mean that one must modify the headers sent by in case of needing for instance a .php to return a stylesheet?
You need to log in before you can comment on or make changes to this bug.