gzip not working in Django with Whitenoise gzip not working in Django with Whitenoise django django

gzip not working in Django with Whitenoise


WhiteNoise only enabled gzip for your static files, not for your entire site, so you need to check one of your static files e.g

curl -I -H "Accept-Encoding: gzip" http://www.sikumia.co.il/static/some-file.css


There should be the problem

https://docs.djangoproject.com/en/1.8/ref/middleware/#gzip-middleware

It will NOT compress content if any of the following are true:

The content body is less than 200 bytes long. The response has already set the Content-Encoding header. The request (the browser) hasn’t sent an Accept-Encoding header containing gzip. You can apply GZip compression to individual views using the gzip_page() decorator.