Debugging when using require.js cache

前端 未结 3 1331
野的像风
野的像风 2021-02-07 03:01

Using require.js I noticed that often the dependencies are cached by the browser and don\'t get updated even if I force the page to completely reload (command+shift+R).

3条回答
  •  佛祖请我去吃肉
    2021-02-07 03:42

    I think you can use the urlArgs on required.config

    quote from http://requirejs.org/docs/api.html#packages urlArgs: Extra query string arguments appended to URLs that RequireJS uses to fetch resources. Most useful to cache bust when the browser or server is not configured correctly. Example cache bust setting for urlA

提交回复
热议问题