 enableTransitionCache = (enable = true) ->
   transitionCacheEnabled = enable
 
-fetchReplacement = (url, onLoadFunction = =>) ->
+enableProgressBar = (enable = true) ->
+  if enable
+    progressBar ?= new ProgressBar 'html'
+  else
+    progressBar?.uninstall()
+    progressBar = null
+
+fetchReplacement = (url, onLoadFunction, showProgressBar = true) ->
   triggerEvent EVENTS.FETCH, url: url.absolute
 
   xhr?.abort()

  setAutofocusElement()
  executeScriptTags() if runScripts
  currentState = window.history.state
  triggerEvent EVENTS.CHANGE
  triggerEvent EVENTS.UPDATE


pageCache               = {}
cacheSize               = 10
transitionCacheEnabled  = false
progressBar             = null

currentState            = null
loadedAssets            = null
