Hi everyone! I’m a very inexperienced webdev using fly.io and PocketBase to build a simple webpage where users can create a soccer lineup. I’ve been making modifications to my lineup.js file to get the functionality correct and redeploying to test the changes I make. That’s probably not the easiest way to do things, but it’s worked well so far.
For example, I put a console.log statement at the top of my file to keep track of what version I’m deploying. This screenshot shows v53.
Hi! Would you mind sharing the output of the flyctl status and flyctl apps releases commands?
(The first, flyctl status, gives an overview of your app, including the running VMs, and should let you figure out if any of them are running an older version of your app. The second, flyctl apps releases, will give you a few more details about your app’s releases than the web interface will.)
This is using the last-modified date as the only caching mechanism, which only works for “conditional” checks (requests sent with “if-modified-since”) which I don’t think a browser will do automatically.
That being said, Chrome for me seems to be caching subsequent requests to that file. I suspect it is for you as well.
What I might suggest is, if possible, modifying the templates so the <script> tags load something like src="lineup.js?bust=1234" where the query string on that is something that updates anytime the file changes (or on each deployment), so each deployment uses a different URL for that .js file (thus busting the browser’s cache of that file).