When I have the same image used for different elements (sprite images), I usually do not call this image again, as this is a new HTTP request.
I rather use:
element1 {
background: url(someImage.png);
}
element2 {
background-image: inherit;
}
Are these HTTP requests saved?
Or if the browser is smart and I can use:
element1 {
background: url(someImage.png);
}
element2 {
background: url(someImage.png);
}
Will the browser make a new HTTP request? Or does he know that I have already uploaded this image?
Question: am I getting something using example 1?
source
share