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

  loadedAssets = null
  createDocument = null
  xhr_req = null

  triggerEvent = (name, data) ->
    event = document.createEvent 'Events'

    value

  rememberReferer = ->
    referer = document.location.href

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