NProgress.start() — shows the progress bar

NProgress.set(0.4) — sets a percentage

NProgress.inc() — increments by a little

NProgress.done() — completes the progress

Perfect for Turbolinks, Pjax, and other Ajax-heavy apps.