Cache busting via params

前端 未结 12 1161
耶瑟儿~
耶瑟儿~ 2020-11-22 03:27

We want to cache bust on production deploys, but not waste a bunch of time off the bat figuring out a system for doing so. My thought was to apply a param to the end of css

12条回答
  •  你的背包
    2020-11-22 04:17

    Found a comparison of the 2 techniques (query string vs file name) here:

    Version as a querystring has two problems.

    First, it may not always be a browser that implements caching through which we need to bust. It is said that certain (possibly older) proxies do ignore the querystring with respect to their caching behavior.

    Second, in certain more complex deployment scenarios, where you have multiple frontend and/or multiple backend servers, an upgrade is anything but instantaneous. You need to be able to serve both the old and the new version of your assets at the same time. See for example how this affects you when using Google App Engine.

提交回复
热议问题