But if a new version is released, it still uses the same filename. So it could cause the old file to be stuck in the browser cache. Especially if we set the browser Cache-Control to something like 1 year... or even 10 years.
If there is a new version released with a plugin update, then the browser will still be pulling in the old version if it was cached for the user. They wouldn't get the new version because of the long browser cache.
Therefore, to help "bust" the browser cache, it would be ideal to add a query string to the JS files. Maybe based on the plugin version. This way, the browser will see it as a new file if/when it truly is updated.
Currently, if/when using the "Track Outbound Links" option for Google Analytics settings, it's loading the tracking JS file like:
https://example.com/wp-content/plugins/all-in-one-seo-pack/public/js/vendor/autotrack.js
But if a new version is released, it still uses the same filename. So it could cause the old file to be stuck in the browser cache. Especially if we set the browser Cache-Control to something like 1 year... or even 10 years.
If there is a new version released with a plugin update, then the browser will still be pulling in the old version if it was cached for the user. They wouldn't get the new version because of the long browser cache.
Therefore, to help "bust" the browser cache, it would be ideal to add a query string to the JS files. Maybe based on the plugin version. This way, the browser will see it as a new file if/when it truly is updated.
For example:
https://example.com/wp-content/plugins/all-in-one-seo-pack/public/js/vendor/autotrack.js?ver=3.5.4