   cacheCurrentPage()
 
   if page = pageCache[state.position]
+    xhr?.abort()
     changePage page.title, page.body
     recallScrollPosition page
     triggerEvent 'page:restore'

  # Remove hash from url to ensure IE 10 compatibility
  safeUrl = removeHash url

  xhr.abort() if xhr
  xhr = new XMLHttpRequest
  xhr.open 'GET', safeUrl, true
  xhr.setRequestHeader 'Accept', 'text/html, application/xhtml+xml, application/xml'
  xhr.setRequestHeader 'X-XHR-Referer', referer
  xhr.onabort = ->
    xhr = null
  xhr.onload = =>
    doc = createDocument xhr.responseText


      else
        resetScrollPosition()
      triggerEvent 'page:load'

  xhr.onloadend = -> xhr = null
  xhr.onabort   = -> rememberCurrentUrl()
  xhr.onerror   = -> document.location.href = url

  xhr.send()

