I think some JS bundling tools generate a short hash (like SHA or MD5) based on the contents of the file. Just a possible alternative to using a version string. The Royale compiler doesn't support doing anything like that automatically, but I don't see why you couldn't write a shell script to run a post-processing step after compiling.
If you want something supported by the Royale compiler, you'd probably need to create a custom index.html template for the release build. Instead of letting the compiler inject the <script> tag, you could hard-code it manually. -- Josh Tynjala Bowler Hat LLC <https://bowlerhat.dev> On Thu, Mar 9, 2023 at 12:43 PM Hugo Ferreira <hferreira...@gmail.com> wrote: > Hi, > > I'm releasing now updates more often and sometimes (many times), the > browser cache my App.js > In a quick google search I found a solution (more a workaround) => > https://stackoverflow.com/questions/1011605/clear-the-cache-in-javascript > When I build - release with VS Code, it inject this line on my html > file:<script type="text/javascript" src="./App.js"></script> > So, I don't have control over it. > > What I would like to do is something like have a version flag of my App in > the asconfig.json and when I build - relase the compiler inject something > like:<script type="text/javascript" src="./App.js?v=1"></script> > <script type="text/javascript" src="./App.js?v=2"></script> > ... > > This is possible today ? > > Regards, > Hugo. >