This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes HTML, CSS and JavaScript and the fly likes How CSS works for Images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How CSS works for Images" Watch "How CSS works for Images" New topic
Author

How CSS works for Images

Chennarao Marvatu
Ranch Hand

Joined: Aug 09, 2004
Posts: 32
Hi all,
I would like to know how CSS works for Images.
Assume, you have 100 same images that are getting repeated in a page ( eg : spacer) and if you declare this in CSS, will CSS makes 100 connections to server or only once when CSS is loaded ?

Thanks,
Chennarao


mchrao
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are you talking about an <img> tag? CSS has nothing to do with the src attribute of that.

Eric
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61084
    
  66

If you are talking about url references such as that you might use for the background-image rule, the bowser should cache these just as it would any other resources.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How CSS works for Images