2

I have a Vue.js application built with Webpack that is hosted on an Amazon S3 bucket, and I seem to be having an issue making the cached copies of index.html expire in the user's browser, such that when I push a new version of the application to S3 (even after emptying S3), the client still loads the old version until the cache is cleared in their browser.

Initially I thought the solution would be to rename the index file upon each release, however I thought that maybe a better solution is to somehow not cache index.html at all, though after reading through conflicting Webpack resolutions I am still not sure how to implement this? Should I add a step in the build pipeline to change the index document of S3 and rename index.html to include a version or build hash, or is there an elegant way of ensuring index.html is not cached by the client?

soulman
  • 33
  • 5

0 Answers0