- Newest
- Most votes
- Most comments
There you go!
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html
"CloudFront determines whether the file is compressible: ... The file size must be between 1,000 and 10,000,000 bytes."
Also, depending on cache settings, don't forget to Invalidate between tests.
Hi Thanos,
Be sure your source files on S3 have 'Cache-Control' AND 'Content-Type' metadata set (under properties). For content-type for javascript, I believe use value: text/javascript
If I recall correctly, this must be set for compression to work.
If you have made changes (from above, or just trying things before), be sure to invalidate the path in CloudFront:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html
Invalidation is required if any changes on s3 or it will drive you nuts - making changes and nothing happens.
Hope this helps. Let me know if it works or not.
Thank you Lily.
I checked both files and they both have the same metadata(only content-type: application/javascript)
Both files are the same in terms of metadata, how they were uploaded, where they are hosted, etc. the only thing that change is the size.
Is it possible that the click-chat file is not gziped due to the low file size? (Size 841.0 B) compared to tracker (Size 68.3 KB) that is served gziped?
Relevant content
- Accepted Answerasked 7 years ago
- Accepted Answerasked 10 months ago
- asked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago