Ctrl + F5 $ c
如何确保 不从缓存中加载?
_worker = new Worker('js / toy-cpu.js');
解决方案
例如,您可以添加一种版本号像这样:
_worker = new Worker('js / toy-cpu.js?v ='+ new Date()。的getTime());
This is incredibly annoying.. I am wondering why the heck my changes aren't reflected as I notice that my JavaScript file for my Web Worker always gets loaded from cache:
I have disabled the Cache and hitting Ctrl + F5
does not work either.
How can I make sure that this file does not get loaded from cache?
_worker = new Worker('js/toy-cpu.js');
解决方案
You could add a kind of version number, for example like this:
_worker = new Worker('js/toy-cpu.js?v=' + new Date().getTime());
这篇关于Web Worker:如何防止从缓存中加载该文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!