- 在nwjs启动时清空缓存;
let gui = require('nw.gui');
let tray;
gui.App.clearCache();
- HTTP服务器返回添加禁止缓存标识;
add_header Cache-Control no-cache;
add_header Cache-Control private;
- HTML添加禁止缓存信息;
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />