Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
179 views
in Technique[技术] by (71.8m points)

Are unused CSS images downloaded?

Are unused CSS images downloaded by the browser or ignored?

Eg. in CSS rules which don't match any elements.

.nothingHasThisClass{background:url(hugefile.png);}

Or would this be browser-dependant?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This would be browser dependent, since it's how they decide to implement the spec, however in a quick test here:

  • Chrome: Doesn't
  • FireFox: Doesn't
  • Safari: Doesn't
  • IE8: Doesn't
  • IE7: Doesn't
  • IE6: Unknown (Can someone test and comment?)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...