FireFox refuses

Reply

Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

FireFox refuses

 
0
  #1
Aug 31st, 2009
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.
Yes, I'm running Ubuntu. Of course.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 848
Reputation: Airshow is on a distinguished road 
Solved Threads: 121
Airshow's Avatar
Airshow Airshow is online now Online
Practically a Posting Shark

Re: FireFox refuses

 
0
  #2
Sep 1st, 2009
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
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 178
Reputation: codejoust is an unknown quantity at this point 
Solved Threads: 18
codejoust's Avatar
codejoust codejoust is offline Offline
Junior Poster

Re: FireFox refuses

 
0
  #3
Sep 1st, 2009
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...
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

Re: FireFox refuses

 
0
  #4
Sep 2nd, 2009
Originally Posted by codejoust View Post
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.
Yes, I'm running Ubuntu. Of course.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC