New games every week!
11th January 2020
Having some right issues with the cache, today.
This week's Shoebox game is ready to go, and I uploaded it earlier today, but have spent the past couple of hours tackling a rather severe caching issue.
The new Cache method is 100% determined that it WILL NOT recache a file within a 24 hours period.
I've tried all kinds of hacks and tweaks, but nothing seems to work at all.
My final "Will it work?" test was to rename one of the files, and although that does indeed work, it ends up leaving the old file inside the cache, which obviously then would build and build and build, if I left it to do so, and changed all the files, all the time.
Instead, I'll leave the majority of the game uploaded, wait 24 hours, then see if it's updated the cached files.
It better well had do, or I'm going to be awfully frustrated over the next few weeks until I can figure out an alternative.
ServiceWorkers are tied to browser rules which state that the browser won't "constantly refresh files", which is great for your phone's data allowance. Cool!
The rules state nothing will refresh within a 24 hour period.
The "best method" to get around this seems to be to add "?Timestamp=date()" to the URL, and though this does seemingly work for most cases, the browser has a heck of a time trying to load those back again from the cache, whenever dealing with images or sound effects.
I'm not sure why this is. It "should" be working, it just isn't.
If my device is online, this isn't an issue, but as soon as I go offline, there's all manner of missing images, all over the site.
And the wordlist doesn't work, either.
This is also, just to wind you up a little more, a browser-by-browser difference, and an even wilder than normal, too.
Safari, Chrome and Edge Chromium seemingly act in different ways to the "?Timestamp" addition, with iOS Safari being the worst at it.
All three of those browsers are warning me that AppCache is soon to be deprecated, and yet not one of those browsers seem to have decided on what the best method to work with the only alternative, would appear to be.
.. and so..
I'm probably going to have to stay one or two days ahead, for Browsercade/Shoebox releases, uploading assets and such beforehand, such that the updates are ready to be downloaded to the game cache whenever the game's actually ready to go.
It's really rather annoying, and is exactly the sort of thing that I created these engines to avoid. The waiting...
New game hopefully tomorrow, although I might wait until Monday, just to be on the safe side.
New games every week!