ASCII Sunset

Updated on Saturday, February 19, 2022

Expert

Expert

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...

Add your comment...

Related Posts

You Might Also Like

(All Marketing Posts)

Enable GZIP compression for Amazon S3 hosted website in CloudFront

Updated on Tuesday, November 12, 2019

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:

Compress Objects Automatically option in Amazon 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:

Amazon S3 CORS Configuration

Add your comment...

Related Posts

You Might Also Like

(All Code Posts)

Book reviews for November 2016

Updated on Friday, February 24, 2017
Revenger by Alastair Reynolds

Revenger by Alastair Reynolds

5/5

Far future space pirates. Awesome.

 

Badass: Making Users Awesome by Kathy Sierra

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.

 

Add your comment...

Related Posts

You Might Also Like

(All Reviews)

El Capitan

Updated on Sunday, October 16, 2022

Recount

Updated on Wednesday, February 22, 2017

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?

Add your comment...

Related Posts

You Might Also Like

(All Politics Posts)

National Popular Vote

Updated on Wednesday, February 1, 2017

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.

Add your comment...

Related Posts

You Might Also Like

(All Politics Posts)

Banana Slug

Updated on Wednesday, February 22, 2017

Banana Slug

Photo of a Banana Slug at Big Basin Redwoods State Park.

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)

Sunrise

Trees at Lands End

Trees at Lands End

Rain falling through trees at Lands End, San Francisco (Golden Gate National Recreation Area).

Add your comment...

Related Posts

You Might Also Like

(Recent Photos)