   xhr.onload = ->
     triggerEvent 'page:receive'
 
-    if doc = validateResponse()
+    if doc = processResponse()
+      reflectNewUrl url
       changePage extractTitleAndBody(doc)...
       reflectRedirectedUrl()
       if document.location.hash


rememberCurrentState = ->
  currentState = window.history.state

rememberInitialPage = ->
  unless initialized
    rememberCurrentUrl()
    rememberCurrentState()
    createDocument = browserCompatibleDocumentParser()
    initialized = true

recallScrollPosition = (page) ->
  window.scrollTo page.positionX, page.positionY

CACHE_SIZE     = 10
currentState   = null
referer        = null
loadedAssets   = null
pageCache      = {}
createDocument = null
requestMethod  = document.cookie.match(/request_method=(\w+)/)?[1].toUpperCase() or ''
xhr            = null


fetchReplacement = (url) ->
  triggerEvent 'page:fetch'
