There are 3 ways to arrange that:
- Either add a script tag into your HTML code manually,
- or install a browser extension (that, when activated, adds the script tag to the visited pages on the fly),
- or use a plugin for your web framework (that adds the script tag on the fly when serving requests), currently only available for Rails/Rack.
So how do you choose?
Use method 1 (insert a tag) or method 3 (framework plugin) if:
- you want live reloading for sites open on iPhone, iPod,
iPad devices or iOS simulator (and, soon, Android
- you want live reloading for sites
open on other computers on your network without browser
- you want to work with file: URLs in Safari (because Safari prohibits extensions from accessing file: URLs under any circumstances)
Use method 2 (browser extension) if:
- you want to preview CSS changes against a live site
- you want to use the upcoming "saving CSS changes from web inspector" feature
- most people prefer this method because it requires no changes to your projects
You can use both if you need to; the script tag you add manually will happily cooperate with the browser extension.
Ready to act? See one of these articles for detailed instructions: