Title: Leverage Browser Caching
Last modified: August 30, 2016

---

# Leverage Browser Caching

 *  Resolved [Jeffrey Carandang](https://wordpress.org/support/users/phpbits/)
 * (@phpbits)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/leverage-browser-caching-27/)
 * Hi,
 * Can you add max-age header type to the images? This will make our site loads 
   faster : [http://stackoverflow.com/questions/15502416/how-to-use-browser-caching-with-amazon-s3](http://stackoverflow.com/questions/15502416/how-to-use-browser-caching-with-amazon-s3)
   Thanks!
 * Cheers,
    phpbits
 * [https://wordpress.org/plugins/amazon-s3-and-cloudfront/](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [A5hleyRich](https://wordpress.org/support/users/a5hleyrich/)
 * (@a5hleyrich)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/leverage-browser-caching-27/#post-6449032)
 * If you enable ‘Far Future Expiration Header’ under the advanced options, all 
   assets will be uploaded with an ‘Expires’ header. The reason we use ‘Expires’
   and not ‘Cache-Control’ is because it’s supported on older browsers.
 * I’ll raise an issue with the team to discuss whether we should also add the ‘
   Cache-Control’ header, which is the newer of the two headers. Browsers which 
   support both will default to using ‘Cache-Control’, which seems like the best
   solution.
 * You can also add your own headers in the meantime using the `as3cf_object_meta`
   filter.
 *  Thread Starter [Jeffrey Carandang](https://wordpress.org/support/users/phpbits/)
 * (@phpbits)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/leverage-browser-caching-27/#post-6449264)
 * Thanks! I’ve enabled the option. Let me check if that feature will work on ‘Leverage
   Browser Caching’. If not, I’ll add the filter. Thanks!
 * Cheers,
    phpbits
 *  [anjanish](https://wordpress.org/support/users/anjanish/)
 * (@anjanish)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/leverage-browser-caching-27/#post-6449391)
 * You can add the cache control header for file using following code either in 
   filter as mentioned in above post(recommended) or by directly adding this line
   at amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php:593 above ‘Expires’
   header.(not recommended)
 * $args[‘CacheControl’] = ‘max-age=31536000, public’;
 *  Plugin Contributor [A5hleyRich](https://wordpress.org/support/users/a5hleyrich/)
 * (@a5hleyrich)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/leverage-browser-caching-27/#post-6449392)
 * There’s no need to modify the plugin code, please use the filter provided.
 * The cache-control header will be implemented in the next release, which is due
   soon.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Leverage Browser Caching’ is closed to new replies.

 * ![](https://ps.w.org/amazon-s3-and-cloudfront/assets/icon-256x256.jpg?rev=1809890)
 * [WP Offload Media Lite for Amazon S3, DigitalOcean Spaces, and Google Cloud Storage](https://wordpress.org/plugins/amazon-s3-and-cloudfront/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amazon-s3-and-cloudfront/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/)
 * [Active Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amazon-s3-and-cloudfront/reviews/)

## Tags

 * [caching](https://wordpress.org/support/topic-tag/caching/)

 * 4 replies
 * 3 participants
 * Last reply from: [A5hleyRich](https://wordpress.org/support/users/a5hleyrich/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/leverage-browser-caching-27/#post-6449392)
 * Status: resolved