Hi Javascript-Experts,
After releasing a new Version, I am facing the issue that (JS) files in the Browser Cache do not update immediately. This leads to errors, esspecially if some files get refreshed before others and the client then operates with a mix of new and old code.
I've looked into some options and would think that revving would be the preferred method of these :
Using the HTTP cache-control header would force the client to update the file in regular intervals, but I don't want all files to be updated every day (or more frequently), when updates occur much less frequently.
RequireJS has the option to append a Query String to XHR, which should invalidate the cache. However, the author of RequireJS does not recommend this approach and there are issues relating to proxies.
Sounders suggests "Revving" filenames in https://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ . Is there any way to automate this with JET (CLI) v10? I have tried switching the baseUrl for the main.js and path_mapping.json from "js" to "js/1.0.0" (and moving the files), but this leads to JET not picking up the jet-composites folder; I.e. the build does not genereate a requireJS config path for them anymore.
Any advice would be welcome.
Kind Regards,
Philip