Skip to content

Instantly share code, notes, and snippets.

@tvandervossen
Created October 12, 2010 20:18
Show Gist options
  • Save tvandervossen/622829 to your computer and use it in GitHub Desktop.
Save tvandervossen/622829 to your computer and use it in GitHub Desktop.
Reload browser on save Kicker recipe
process do |files|
execute("osascript -e 'tell application \"WebKit\"
do JavaScript \"window.location.reload()\" in first document
end tell'")
end
@tvandervossen
Copy link
Author

I use this Kicker recipe for almost any JavaScript and/or HTML/CSS project I work on to automatically reload the browser window every time I save something in the project directory.

You can replace 'WebKit' with 'Safari' if that's what you prefer. More information on Kicker can be found at http://github.com/alloy/kicker

@NV
Copy link

NV commented Oct 12, 2010

LiveReload is more advanced solution. It can update CSS without reloading the whole page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment