Closed Bug 272562 Opened 20 years ago Closed 20 years ago

CSS stylesheet is not loaded / read if css file is named other than .css eg. .php files is not read as style when used.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: rudi, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

<link rel="stylesheet" href="/site/dk/include/main.css" /> works
<link rel="stylesheet" href="/site/dk/include/main.php" /> does not

Reproducible: Always
Steps to Reproduce:
1. create stylesheet file with other extension than ".css". fx. ".php"
2. Set link on html page with styled content <link rel="stylesheet"
href="stylemain.css" />
3. Browse page, see difference to .css equevelant

Actual Results:  
Style is not set when stylesheet has different extension than .css fx. .php

Expected Results:  
Show the styles on the formatted elements
Firefox doesn't care about filenames, it does however care about MIME types,
make sure you're sending the file as text/css and not text/html (which is the
default for PHP processed files).
What does the Javascript console say?
header("Content-Type: text/css"); in php does the trick
No response in over 3 months, closing as INVALID.

Reporter, if you can still reproduce the problem after adding the line from
comment 3 then please reopen the bug.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.