Est. Reading Time: 1 minute

When putting a template together or marking up a web page, I persistently save, change to my browser, refresh–and evaluate the last few edits, and then swap back to my editor.  It would be really (really!) nice if the browser just updated automatically, and I just needed to glance at a monitor as development progressed.  (Especially with a multi-monitor workstation.)

Well, I found a script that does just that written by Martin Kool.  When embedded in the head of a document, Live.js  will update a page’s HTML, CSS, and JavaScript on the fly. I’ve tested that it even recognizes when the script itself has been removed from the file and will discontinue running.  It is important to remove this script after development and testing so that you don’t end up seeing a flood of HTTP requests live in production:

Constant HTTP requests that check for changes in page resources

And here’s the one-liner to make use of it:

<script src="" type="text/javascript" ></script>