Closed Bug 123674 Opened 23 years ago Closed 23 years ago

stylesheet will not load if filename is not *.css

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Linux
defect
Not set
major

Tracking

()

VERIFIED INVALID

People

(Reporter: mavos, Assigned: dbaron)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020203 BuildID: 20020203 Since 0.9.7, Mozilla does not use a stylesheet if the filename ends with anything but .css. I don't know if it's a problem with the filename itself or if it's the fact that the server says the type is something other than text/css. Since type="text/css" is specified in the link tag, Mozilla shouldn't care what the web-server says. Reproducible: Always Steps to Reproduce: 1. Look at the test page. Actual Results: The two frames don't look the same. Expected Results: The two frames should be identical.
By the way... this is an obvious problem in case the style sheet is generated through, for example, a PHP script. That's how this bug was discovered. For a more illustrating example, look at http://www.e-b.nu/ using Mozilla 0.9.7/0.9.8 and another browser, such as Internet Explorer or an earlier version of Mozilla, and compare what you see.
This is intentional, and I think it should be marked INVALID (unless we want to mark it as duplicate). The type given in the markup is merely advisory. The type returned by the server is authoritative. You should be able to configure PHP / the server to return whatever MIME type you want.
Yep, see bug 46225. The HTTP spec is the standard we follow in this case. dbaron is correct. the type attribute is only a hint to tell us what to expect. If the server tells us something is text/plain though, then we don't parse styles from that file. We only parse styles for files served as text/css (standards mode only). So the extension is not really the issue here. It is the content-type. PHP defaults to sending "text/html" for every php script, but you can override this on a per-script basis by including this (before anything is outputted) In your PHP scripts, Simply do: <?php header("Content-Type: text/css"); ?> *** This bug has been marked as a duplicate of 111586 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
reopening. This should be evang, different page.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
actually, nevermind. I suck. There is no real page involved, just a misconfigured test....
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → INVALID
verified
Status: RESOLVED → VERIFIED
*** Bug 206621 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.