Automatically refresh browser in response to file system changes?

夙愿已清 提交于 2019-11-27 23:23:34

I can think of a way to do this for Firefox. You install the MozRepl plugin. You can then have it start up and telnet to port 4242 (by default) and control the browser via. Javascript commands. Issuing a BrowserReload() will reload the current tab.

Now, add an editor hook to do that when any files in the current project are saved and it'll be taken care of. I believe there are some snippets around that already do this.

I don't use Safari or Chrome too much so I don't know about options there.

Also, I'm not sure this is a good idea really. I don't want my browser to refresh on every file save. I usually make a bunch of changes to the backend, css and maybe even images and then when I'm ready, reload the browser tab. It's not per save. Anyway, this will do what you want.

From the browser no, not really possible as far as I know. You could add a interval javascript to refresh the page every x-seconds. But to be honest, isn't Ctrl+R suitable enough to see changes?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!