Debugging when using require.js cache

前端 未结 3 1364
野的像风
野的像风 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条回答
  •  萌比男神i
    2021-02-07 03:31

    Actually there are some things you can do:

    Either you disable your browser caching completely to test it. An easy way in e.g. Chrome is to open a Incognito Window (CTRL + SHIFT + N) similar to the Private Browsing mode in Firefox. However the more ideal solution for you should be listed here: Disabling Chrome cache for website development

    Or you instruct your webserver to send no cache headers for javascript or some javascript files. One possibility is to use mod_expires with apache.

提交回复
热议问题