Our clients' sites are frequented by a large number (10k+) of users who regularly utilize the web app we have designed, improved, and maintain for them. With continuous enhancements and developments to the web app's javascript, we deploy frequent backward-incompatible updates as the app progresses. During each deployment, the javascript is minified, concatenated into a single file, loaded in the browser through require.js, and hosted on Amazon S3 with an unchanging file name and URL. However, following a major refactor deployed last week, we received several reports that some users, particularly those on Firefox, experienced issues with the app not functioning properly. It appeared to be related to caching problems, which were temporarily resolved with a simple refresh.
It has raised concerns about the implications of deploying a new version of the javascript file under the same name on S3 and whether measures such as cache-busting or manipulating S3's headers need to be implemented to ensure that browsers fetch the latest version promptly. Failure to address this issue could result in synchronization failures between the javascript and server API, leading to functional disruptions like the one observed here.
Although it may not be directly relevant, it's worth noting that the site's server operates on Django, while the application and database are deployed on Heroku. Static files are transferred to S3 using S3Boto through Django's collectstatic command.