943,960 Members | Top Members by Rank

Ad:
Aug 31st, 2009
0

FireFox refuses

Expand Post »
Yesterday I discovered that FireFox refused to read CSS files that did not have the CSS extension.

I have a basic CSS that's always read, based on the CSS extension (I have a script that automatically loads all CSS files found in the local directory).
Then I had a set of files with the extension .css2, and the script selects ONE of them in a random fashion.
After some trial and error I found that the files were not read as long as they did not have the extension .css.

I found another solution but now I wonder: Is this a standard restriction, or is it just FireFox? (I use 3.0.13).

I use the standard statement:
HTML and CSS Syntax (Toggle Plain Text)
  1. <link rel='stylesheet' type='text/css' href='filename' />
Last edited by ingeva; Aug 31st, 2009 at 7:09 am.
Similar Threads
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008
Sep 1st, 2009
0

Re: FireFox refuses

I think you will find this is universal - ie. occurs in all browsers.

But it's hardly a limitation. Simply ensure all your css files have the .css extension.

Airshow
Sponsor
Reputation Points: 318
Solved Threads: 358
WiFi Lounge Lizard
Airshow is offline Offline
2,527 posts
since Apr 2009
Sep 1st, 2009
0

Re: FireFox refuses

Browsers don't typically about the extension of a css style as long as the MIME type is correct.
This is sent using HTTP headers, and can be changed using a server-side scripting langage, or an htaccess override for .css2 files.
In your case, the server is seeing css2 as unknown and sending it out as text/plain instead of text/css.
More Information...
Reputation Points: 18
Solved Threads: 21
Junior Poster
codejoust is offline Offline
180 posts
since Jul 2009
Sep 2nd, 2009
0

Re: FireFox refuses

Click to Expand / Collapse  Quote originally posted by codejoust ...
In your case, the server is seeing css2 as unknown and sending it out as text/plain instead of text/css.
OK, thanks! I just though that my type specification (text/css) would override this.

The easiest solution in my case will be to include these CSS specification in the source (html) file.
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: How to create a website
Next Thread in HTML and CSS Forum Timeline: Good web page designer for Linux





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC