How can I force clients to refresh JavaScript files?

后端 未结 26 2275
旧时难觅i
旧时难觅i 2020-11-22 03:40

We are currently working in a private beta and so are still in the process of making fairly rapid changes, although obviously as usage is starting to ramp up, we will be slo

26条回答
  •  误落风尘
    2020-11-22 04:12

    The common practice nowadays is to generate a content hash code as part of the file name to force the browser especially IE to reload the javascript files or css files.

    For example,

    vendor.a7561fb0e9a071baadb9.js
    main.b746e3eb72875af2caa9.js

    It is generally the job for the build tools such as webpack. Here is more details if anyone wants to try out if you are using webpack.

提交回复
热议问题