 
 initializeTurbolinks = ->
   document.addEventListener 'click', installClickHandlerLast, true
+  document.addEventListener 'page:prefetched', logPrefetchCompletion, true
   window.addEventListener 'popstate', (event) ->
     fetchHistory event.state if event.state?.turbolinks
   , false

  xhr.onerror   = -> document.location.href = url

  xhr.send()

cacheInLocalStore = (url, xhr) ->
  localStorage.setItem(url, xhr.responseText)

createDocument = null
requestMethod  = document.cookie.match(/request_method=(\w+)/)?[1].toUpperCase() or ''
xhr            = null
pageTreeUrl    = '/local_storage_sync'
url_counter    = { x: 0 }

visit = (url) ->
  if browserSupportsPushState && browserIsntBuggy
