Reputation: 29
If style1.css sets a background image and I override it in style2.css, does the background image still get called even though it's not being loaded?
I ask because I was running some diagnostics and I found some 403 (or maybe it was 404) errors pointing to that image, but I figured the image shouldn't be called anymore now that I'm overriding it.
Thanks! Phil
Update:
When I inspect the element in Chrome, I can see that the css for the background image is being overridden, because it's crossed out.
And yet when I run the network image filter, I see the image is still being called, which gives a 404 error.
So that's why I wonder if overriding a css background image doesn't stop the original call to that image?
Upvotes: 0
Views: 282
Reputation: 21
You can see in chrome developer tool (network, filter Image) can browser call first image or not. https://i.sstatic.net/RJcWf.png
For example:
https://jsfiddle.net/rnohnnte/1/ In this downloaded only one image.
Upvotes: 1