So, I hosted an angular app on s3 with a cloud drive. I am doing a file update (using grunt filerev) to make sure that I never get outdated content. But how should I change the index.html file. Its necessary because all other files reference index.html.
I configured my bucket to use as a static site. So it just picks up index.html when I refer to the bucket in the url.
Cloudfront says you should set min TTL to 0, so it will always delete the source code to serve the content. But I do not need this, because I am checking the files of all my files (except index.html). I can use cdn caching for these files.
They also say that in order to invalidate a single object, set the maximum headers to 0. I tried adding the following to my index.html
<meta http-equiv="Cache-Control" content="public, must-revalidate, proxy-revalidate, max-age=0"/>
But this is not reflected after loading on s3. Do I need to explicitly specify headers on s3 using s3cmd or dashboard? And does it need to be done every time index.html changes and I load it?
I know that I can invalidate a single file using cmd, but its a repeating process. It would be great if he could take care of himself by simply deploying to s3.
html amazon-s3 amazon-web-services amazon-cloudfront cdn
Nirav gandhi
source share