Closed Bug 299637 Opened 19 years ago Closed 19 years ago

Linked stylesheets with non .css extension fail to load

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: phil.ewington, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

When trying to load a stylesheet with an extension other than .css, it appears
to fail to load. In an attempt to create dynamic stylesheets and make browser
specific changes written conditionally, the error was discovered.

Reproducible: Always

Steps to Reproduce:
1.Go to www.n-igma.net/test/csstest.htm
2.Click the link for dynamic css link and see no styles.
3.Click the static css link and see how it should look.

Actual Results:  
The page with linked stylesheets with a .php extension fail to load

Expected Results:  
The page with linked stylesheets with a .css extension load

The only difference is the file extsnion of the linked stylesheet.
The other difference is almost certainly the content-type they are served with.
Mozilla won't recognise style sheets in strict mode unless they are served with
the correct content-type - "text/css".

Change your style sheet autogeneration code to set this correctly, and it'll
probably start working.

Gerv
(In reply to comment #1)
> The other difference is almost certainly the content-type they are served with.
> Mozilla won't recognise style sheets in strict mode unless they are served with
> the correct content-type - "text/css".
> 
> Change your style sheet autogeneration code to set this correctly, and it'll
> probably start working.
> 
> Gerv

The 'type' parameter in the link tag is set to text/css, or did you mean in
another way?

- Phil.
> The 'type' parameter in the link tag is set to text/css, or did you mean in
> another way?
> 
> - Phil.

Ignore comment, just me being a numb nuts. TChanging Content-Type resolves this
issue. Thanks for your help.

- Phil
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.