I haven't checked Klout for a long time - while I was away they've decided I'm a expert in Indian politics. Explains a lot...
Enable GZIP compression for Amazon S3 hosted website in CloudFront
By default compression doesn't work in CloudFront for a website backed by an Amaxon S3 bucket.
The first step is pretty obvious - switch on compression in CloudFront:
To get to this setting open you distribution, go to the Behaviors tab and edit your behavior(s). Scroll down to the bottom and toggle Compress Objects Automatically to On. Save and drum your fingers while the distribution updates.
The less obvious piece is that CloudFront will only compress files between 1,000 and 10,000,000 bytes (as of writing this post) and it detects the filesize from the Content-Length header. What the documentation doesn't mention is that S3 does not send the Content-Length header by default and so no compression is applied.
Go to S3 and open the properties for your bucket (not for individual files). Expand Permissions and then click Edit CORS Configuration. You need to add Content-Length as an allowed header like this:
Related Posts
- How to get SEO credit for Facebook Comments (the missing manual)
- User scoped custom dimensions in Google Analytics 4 using gtag
- Automate Google PageSpeed Insights and Core Web Vitals Logging with Apps Script
You Might Also Like
Book reviews for November 2016
Badass: Making Users Awesome by Kathy Sierra
3/5
The overall message is good - focus on making your users actually awesome rather than you looking awesome with some concrete strategies to find out what that is and how to get there. A central theme is removing barriers to effective usage. The product here is a book. It was hell to read on my phone. Now if the graphics were large and central to the message and couldn't be done other than in some weird non-standard way I might forgive this. But all I needed to on every page was zoom in to get rid of the needless massive borders. That's all it took. Hundreds of times. So I'd recommend this if you still like paper books or are some sort of tablet toting throwback but on phone? No.
Related Posts
You Might Also Like
El Capitan
Recount
I'm on a donation spree. This time to the Jill Stein recount effort. I believe that this will change the outcome of the election as much as I believe that there are real questions about vaccines and autism. But this is clearly making Trump mad. And the madder he gets the sooner he is likely to get himself impeached. Why not help out?
Related Posts
You Might Also Like
National Popular Vote
I just donated to the National Popular Vote campaign. The idea is that if enough states pass enabling legislation they will all throw their electoral college votes behind the popular vote winner. Electoral college neatly short-circuited without any constitutional amendment needed. California is already signed up for this. You can check your state here.
Related Posts
- End the Electoral College: Amendment, Compact, or Supreme Court?
- Fuck the Electoral College
- What if the Senate Voted Proportionally to Population
You Might Also Like
Banana Slug
Photo of a Banana Slug at Big Basin Redwoods State Park.
Related Posts
You Might Also Like
Sunrise
Inverted tiny planet rendering of an unusually red sunrise in San Francisco.
Related Posts
You Might Also Like
Trees at Lands End
Rain falling through trees at Lands End, San Francisco (Golden Gate National Recreation Area).