Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How CSS works for Images" Watch "How CSS works for Images" New topic

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 ?


Eric Pascarello

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

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

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] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: How CSS works for Images
jQuery in Action, 3rd edition