 rememberInitialPage = ->
   window.history.replaceState { turbolinks: true }, "", document.location.href
 
-
 if browserSupportsPushState
   rememberInitialPage()
 

window.historyCache = []
window.testArray = []
visit = (url) ->
  if browserSupportsPushState?
    reflectNewUrl url
    fetchReplacement url
  else

  xhr.send()

fetchHistory = (url) ->
  while(@historyCache.length > 0)
    cache = @historyCache.pop()
    if cache.url == url
      replaceDocument cache.body, cache.title
      triggerPageChange
