How can I force clients to refresh JavaScript files?

后端 未结 26 2209
旧时难觅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:15

    Not all browsers cache files with '?' in it. What I did to make sure it was cached as much as possible, I included the version in the filename.

    So instead of stuff.js?123, I did stuff_123.js

    I used mod_redirect(I think) in apache to to have stuff_*.js to go stuff.js

提交回复
热议问题