I have something like this in css
.ajax-loader {
background-image: url(../images/icon/loader.gif);
}
and used on HTML elements like this
<div class='ajax-loader'></div>
my question is:
If the ajax-loader style is used multiple times in a single page, will the image loader.gif be loaded multiple times or only once?
This image will be loaded once.This is very simple like
object-oriented programing.Define a class once and use everywhere.The same thing is followed in css.Once the image is loaded you can use it everywhere and also this is a good programming approach