Does a cache buster on an image URL in CSS cause an extra request?

后端 未结 2 1989
栀梦
栀梦 2021-01-07 06:07

If I add a cache buster to an image URL in one rule in my CSS

background: url(../img/sprite.png?version=20130205) no-repeat -75px -208px;

b

相关标签:
2条回答
  • 2021-01-07 06:15

    Yes it will cause a new request for the image. If it is ? the image will reload.

    If you don't want to make new request use # in example

    background: url(../img/sprite.png#version=20130205) no-repeat -75px -208px;
    
    0 讨论(0)
  • 2021-01-07 06:15

    Yes, you got it right. All points. When the portion following the ? differs, it always reloads.

    0 讨论(0)
提交回复
热议问题