My CI will build the site when changes are made to the
main
main
branch, and replace the contents of the S3 folder. When that happens I also invalidate the cloudfront-cache, so all future requests go at least once to the newly update files and aren't served by cloudfront.
BUT: There also seems to be some browser-caching going on, i.e. sometimes, after an update of my site, if I switch to a tab I had open of the solid-js SPA, I will get an
unknown client error
unknown client error
and some import problem of the
_build/assets/filename-CRYkDoFJ.js
_build/assets/filename-CRYkDoFJ.js
where it tries to load one of the old
***-<id>.js
***-<id>.js
build artifacts. Do any of you have experience preventing this? (I don't want my users to have to refresh their browsers if they have our site open in a tab and happen to come back to it after a few days away)