I have setup static files (css, images and js) files on a cloudfront distribution and am using the cloudfront URLs of the files to refer to them in the JSP files.
I have setup cache-control value to a max of one month.
Suppose if I modify the css/js files before cache expires and update the files in the cloudfront distribution after invalidating the original object.
What are the ways in which I can make sure that the browser fetches the updated file ?
Amazon recommends a technique they call “versioning” which basically means change the object’s filename when you change the object.
The CloudFront developer manual ( http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?ReplacingObjects.html ) describes it as follows: