Keir Whitaker

About The Author

Keir Whitaker Keir Whitaker works at Shopify & co-hosts The Back to Front Show podcast. He regulary writes about, and shares links on, ecommerce, the web industry & podcasting.

Sidenote: LiveReload For Better Workflow

Welcome to the first entry in a new series on Smashing Coding called Sidenotes. Sidenotes are shorter than traditional Smashing Magazine articles and are designed to give you a quick introduction to useful tools and services. Over the next few weeks, we’ll be looking at productivity aids, useful apps, essential plugins and code examples that we think will help you in your daily coding work. If...

Welcome to the first entry in a new series on Smashing Coding called Sidenotes. Sidenotes are shorter than traditional Smashing Magazine articles and are designed to give you a quick introduction to useful tools and services. Over the next few weeks, we’ll be looking at productivity aids, useful apps, essential plugins and code examples that we think will help you in your daily coding work. If there is a tool, product or service that you think would be great to review, please do get in touch and let us know.

First up is LiveReload, a utility that eliminates the need to refresh the browser when you want to see HTML, CSS and JavaScript changes.

Overview

  • Tool: LiveReload
  • Description: Monitors changes in your files and automatically refreshes the browser
  • Category: Developer workflow
  • Price: Free
  • Time to implement: 5 minutes
  • OS: Mac OS X

What Does It Do?

LiveReload eliminates the need to refresh your browser every time you make a change to a file in your project. It’s pretty enticing: make a change to the CSS, and see your browser instantly refresh. The same goes for HTML, images and JavaScript. No more Alt + Tab and then hard-refresh; updates are now instant.

But it really comes into its own when used in combination with things like CoffeeScript, SASS, LESS, HAML or Jade. LiveReload monitors for any changes in your files, compiles them for you and then refreshes the browser. You can also specify the destination folder for compiled files. If this isn’t your thing or you have another way of handling compilation, you can simply turn it off.

Installation

  1. Download LiveReload from the website, and install it.
  2. After launching the application, you will be asked to add the relevant browser extensions.
  3. Click on the LiveReload icon in the menu bar, and specify your “folders to watch.” I usually pick the project’s root folder, but you can be more specific if you wish.
  4. Highlight your folder to watch and click “Settings.” From here, you can enable things such as Sass compilation.
  5. Activate LiveReload in your browser. (In Safari, right-click and then select “Enable Live Reload.” In Chrome, click the LiveReload toolbar button.)
  6. Change a file and watch the browser automatically refresh.

LiveReload for Rails

The installation process for Rails is a little different. The team at EnvyLabs has also created a four-minute screencast showing LiveReload in action.

Resources

(al)


More Articles on

Poll: Which Framework Would You Recommend To A New Developer?

by Keir Whitaker

When I started developing websites, back in the days when we wrote HTML proudly in uppercase, Web development frameworks didn’t really exist in the form we have today. I’m sure I’m not the only one who could dig out a folder of “include” files that helped me handle repetitive coding functions such as interacting with databases and forms. Today, we can choose from a huge array of...

Read more

A Quick Look Into The Math Of Animations With JavaScript

by Christian Heilmann

In school, I hated math. It was a dire, dry and boring thing with stuffy old books and very theoretical problems. Even worse, a lot of the tasks were repetitive, with a simple logical change in every iteration (dividing numbers by hand, differentials, etc.). It was exactly the reason why we invented computers. Suffice it to say, a lot of my math homework was actually done by my trusty...

Read more

How To Make An eBook

by Jason Mark

Making an eBook is easy, regardless of your coding experience. This is good, because 99.9% of your time should be spent on writing and getting your book out there, rather than on technology. Any electronic book can be called an eBook, but because over 90% of all eBooks are read on Amazon’s Kindle, Apple’s iOS devices (iPad, iPhone and iPod) and the Barnes & Noble Nook, I’ll focus on the...

Read more