-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gzip #36
Comments
Just set AWS_IS_GZIPPED = True in your settings.py. It's a feature of django-storages. Happy coding!
|
That's crazy that I haven't seen that! My move was this (which I saw somewhere else) GZIP_CONTENT_TYPES = (
'text/css',
'application/javascript',
'application/x-javascript',
'text/javascript'
) I'll try it with one and the other and report back. |
Your way worked and mine didn't. adding AWS_IS_GZIPPED = True to the settings.py file shaved 86% off the size of the css file! Aka, totally worth the added CPU to unzip it. Thanks for the help. |
My JS/CSS assets (which are served off of CloudFront are not being Gzipped). I am pushing the assets to S3 using:
I've been reading up on it a bit, and it seems that if you need to gzip it before your push to cloudfront, remove the .gz part and set the content type to gzip on the asset in S3. This should obviously be handled automatically, but it seems crazy that the collectstatic pushing it to S3 doesn't handle it automatically. Any thoughts about how to integrate it or what setting is needed for this?
The text was updated successfully, but these errors were encountered: