在Mac上运行带有nwjs的应用程序时,有没有办法进行硬浏览器刷新?nwjs的右键单击“模拟浏览器重启”似乎再次在入口点启动应用程序。有没有办法在Chrome中模拟简单地点击shift重新加载按钮的行为?
发布于 2018-05-24 12:43:27
有一个nwjs api可以做到这一点:
// Load native UI library
var ngui = require('nw.gui');
// Get the current window
var nwin = ngui.Window.get();
// this will do a hard refresh
nwin.reloadIgnoringCache();
// here's a regular refresh
nwin.reload();
nwjs文档:
http://docs.nwjs.io/en/latest/References/Window/#winreloadignoringcache
发布于 2018-05-30 09:48:04
只需使用javascript重载即可
location.reload();
https://stackoverflow.com/questions/50498404
复制相似问题