2

If I am using background: url in my CSS files like:

background: url("/app/assets/imgs/someimage.png") no-repeat !important;

Is the image will load from my cache(assuming it is there), or it will send a new request for it?

I have checked chrome://cache/ and the image exists.

Itsik Mauyhas
  • 3,506
  • 12
  • 62
  • 105

1 Answers1

3

Referring to a background image URL in CSS will form a HTTP GET Request within the browser which will first check the local cache for that URL.

So yes - if the file is cached locally, and the URL is exactly the same, it will pull it from the local cache.

Curtis
  • 98,395
  • 62
  • 265
  • 345