Reputation: 10930
I found this import directive in a css file I am working on at the moment:
@import url("adverts.css");
When I look at the website in Chrome, adverts.css
gets imported fine and all the styles from this file get used just as expected. However if I look at the website in FireFox they don't!
The even odder thing is that when I rename adverts.css
to adverts1.css
and change the import to:
@import url("adverts1.css");
the file all of a sudden works in FireFox :D
So I am wondering if FireFox has some strange caching in place for css @import
s?
fyi: I use FireFox 22.0
Upvotes: 1
Views: 218
Reputation: 40872
Out of the comment the problem was the installed AdBlocker.
The change from adverts.css
to adverts1.css
had the result, that the file did not match a rule for ad detection anymore, and therefore was loaded then.
To avoid such problems (also with other plugins) I test my sites with the common plugins and without any plugins. In Chrome most of the problematic plugins are deactivated in private browsing. Or you can use different Profiles one for testing without plugins, one with the problematic ones and one for normal browsing.
Upvotes: 1
Reputation: 6410
It depends on the server configuration. Your browser does request the file but it might receive a 304 Not Modified
and so not request the file again. You can see this in Firefox using the Firebug extension.
my_layout.css
@import "test.css";
On first request:
GET my_layout.css 200 Ok
GET test.css 200 Ok
On second request:
GET my_layout.css 304 Not Modified
GET test.css 304 Not Modified
Upvotes: 1