Site icon The Perpetual Student

Setting Cache-Control Header

Google PageSpeed Insights is giving me one of the criterias that requires some work:

Leverage browser caching

I’m using Amazon S3 + CloudFront to serve my static assets.  To set the HTTP headers for Cache-Control, I used an application on Windows called “CloudBerry Explorer for Amazon S3”.

The application lets me manage many different types of server storage, including AWS S3.  To update multiple file headers:

max-age is in seconds.  Converting 604800 seconds will be equivalent to 1 week.

Exit mobile version