   loadedAssets = null
   createDocument = null
   xhr_req = null
+  referer = null
 
   triggerEvent = (name, data) ->
     event = document.createEvent 'Events'

    value

  rememberReferer = ->
    window.referer = document.location.href

  processResponse = (responseText, status, headers)->
    clientOrServerError = ->

      method: 'GET',
      headers: {
        'Accept' : 'text/html, application/xhtml+xml, application/xml',
        'X-XHR-Referer' : referer
      },
      timeout: xhr_req.promise
    }).success((data, status, headers)->
