ember-cli-deploy-aws-pack icon indicating copy to clipboard operation
ember-cli-deploy-aws-pack copied to clipboard

Browser caching of index.html

Open simonihmig opened this issue 7 years ago • 1 comments

When using this pack, I discovered an issue with the way S3 and CloudFront send HTTP headers for your index.html (or rather any history-location based URL that gets served by index.html), as they send a far future expires header by default (https://github.com/ember-cli-deploy/ember-cli-deploy-s3#cachecontrol), thus enabling the browser to cache that file almost infinitely. This makes sense for fingerprinted assets, but not for index.html, as you would not see any newly deployed app updates until the browser cache is cleared.

The ember-cli-deploy-s3-index plugin therefore sets no-caching headers for index.html: https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index#cachecontrol. Not sure how this should be solved with this pack, other than maybe adding this plugin as well?

simonihmig avatar Nov 30 '17 11:11 simonihmig

Wanted to bump this and also note that even adding ember-cli-deploy-s3-index into the mix doesn't help, because s3 settings prevail.

duboff avatar Jul 22 '18 15:07 duboff