Set Accept-Encoding header to fetch compressed data #46

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+1 −0
Split
@@ -17,6 +17,7 @@ fetchReplacement = (url) ->
xhr = new XMLHttpRequest
xhr.open 'GET', url, true
xhr.setRequestHeader 'Accept', 'text/html, application/xhtml+xml, application/xml'
+ xhr.setRequestHeader 'Accept-Encoding', 'gzip, deflate'
xhr.onload = ->
changePage extractTitleAndBody(xhr.responseText)...
triggerEvent 'page:load'