• acornils

    (@acornils)


    There is an issue or at least my opinion it is an issue with the W3TC plugin using the CDN Features of the plugin with Amazon Cloudfront and S3 as origin for cloudfront caching. There are is No max-age or expires headers set for content that originates from S3 to the Cloudfront CDN on AWS. This because on AWS when using cloudfront with an s3 origin these headers must be set when content is put in the S3 bucket by the plugin and this is not happening. Because an S3 Bucket is the Origin AWS doesn’t allow you to override these headers on the cloundfront CDN they must be set for the each object in the S3 Bucket when the object is put in the bucket. I respectfully request that W3TC add the option to include these header values when putting objects in the S3 buckets. The reason for this is the the above headers are not being set and is effecting browser caching. This essentially from what I know is breaking browser caching for cloud front hosted content when using this plugin. If anyone knows a hack to the plugin to insert these values when putting objects into the s3 bucket that would be great. I have tried to modify the plugin for this but keep breaking the signature of the putObject when I add the need headers to the putObject functions in the lib/s3.php file. I am not the only running into this issue but information on a fix to this issue seems to be unavailable at this time from what I can tell.

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

    (@bookclubreader)

    @acornils – I have tried setting up AWS Cloudfront. I used a video from Youtube that seemed reliable. In the video, the presenter shows that his images are in fact loading from the cloud.

    However, it’s not working on my multisite. Nothing is loading from Amazon Cloudfront. Does that fit with the issues you are experiencing?

    Thread Starter acornils

    (@acornils)

    AWS Cloudfront and S3 are configured correctly and content is be cached and served by the CDN. Issue as explained above is under this setup cache control headers are being set for max-age or expires. This due do to the interaction on AWS between Cloudfront and the S3 origin the requires this options to be set on the S3 object when it is put into the S3 bucket by the plugin. The plugin has not been programed insert these metadata values when it posts the content to the S3 in my opinion should be because in it’s current state it is preventing content from being cached by web browsers.

    In the community verion there are some bug fix about aws ecosystem… see if it help https://github.com/szepeviktor/w3-total-cache-fixed

    @acornils: Did you resolve this issue? I’m having the very same problem.

    I noticed this happens only on minified JS/CSS

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘CDN With AWS Cloudfront and S3 Browser Caching Issue’ is closed to new replies.