Clone this wiki locally
Livereload tells your browser to refresh when files change.
For this to work, guard-livereload has to somehow send the
livereload.js script to your browser.
There are 2 ways to do this:
- Use a LiveReload plugin in your browser
- Add a special snippet to your web page (automatically or manually)
1. Using a LiveReload plugin in your browser
guard-livereloadstarts listening for browser connections
- Start your app or server (
- Find a livereload plugin for your browser and install it
- In your browser, open the url you're working on, e.g.
- In your browser, enable LiveReload on that page, e.g. click the livereload toolbar icon in Chrome (until the little circle becomes filled in) or in Safari right-click on the page and enable LiveReload
2. Adding a snippet to your web page
If you're using Rails or Sinatra, you may just check out: https://github.com/johnbintz/rack-livereload#readme
(This automatically adds the snippet to every page served to the browser)
If you're not using a Rack-based server, you can manually add the snippet as described here: http://feedback.livereload.com/knowledgebase/articles/86180-how-do-i-add-the-script-tag-manually-
(Of course, you probably don't want the snippet added on your production code).