Stack Exchange
Rails/Heroku asset partial loading (206) resulting in net::ERR_CONTENT_DECODING_FAILED
I am encountering a problem serving my javascript assets (application.js). In some cases the application.js is loaded with range request headers:
https://variantimagegrouper.herokuapp.com/assets/application-a3ee423959be85930b3400af612a03e5e6e7ecb67f024933780216ac3b172e72.js
Request Headers

Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:de,en;q=0.8,de-DE;q=0.6,en-US;q=0.4
Cache-Control:max-age=0
Connection:keep-alive
Host:variantimagegrouper.herokuapp.com
If-Range:Thu, 24 Mar 2016 12:35:03 GMT
- Range:bytes=68161-68161
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2723.2 Safari/537.36

This results in an Error 330 (net::ERR_CONTENT_DECODING_FAILED) and as a result the apps javascript is not loaded correctly.
Hitting Ctrl-F5 (clean cache reload) solves the issue and the application.js is loading correctly, but thats something we have to tell customers regularly.
Any ideas on why the request is made as a range request in the first place and on how to solve that? I feel like it is an issue related to client caching and was thinking about disabling caching at all, but not my favourite solution.
Partial Request
Thanks,
Dave

How is it requested? Looks like it requested as some media like audio or video. Is src of script tag?

Hi @Andrey , it's requested via script tag:
