Auto-reload browser when I save changes to html file, in Chrome?

后端 未结 23 2156
半阙折子戏
半阙折子戏 2020-12-12 11:46

I\'m editing an HTML file in Vim and I want the browser to refresh whenever the file underneath changes.

Is there a plugin for Google Chrome that will listen for ch

23条回答
  •  没有蜡笔的小新
    2020-12-12 12:34

    (function() {
        setTimeout(function(){
            window.location.reload(true);
        }, 100);
    })();
    

    Save this code into a file livereload.js and include it at the bottom of the HTML script like so:

    
    

    What will this do is refresh the page every 100 mili-seconds. Any changes you make in code are instantly visible to the eyes.

提交回复
热议问题