Linked stylesheets with non .css extension fail to load

RESOLVED INVALID

Status

()

Firefox
General
--
major
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: Phil Ewington, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
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
(Reporter)

Comment 2

13 years ago
(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.
(Reporter)

Comment 3

13 years ago
> 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
Last Resolved: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.