How can I force clients to refresh JavaScript files?

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

    location.reload(true);

    see https://www.w3schools.com/jsref/met_loc_reload.asp

    I dynamically call this line of code in order to ensure that javascript has been re-retrieved from the web server instead of from the browser's cache in order to escape this problem.

提交回复
热议问题