So, I'm currently implementing HTML file cache busting into my project.
Unfortunately, Neocities has (what I'm pretty sure is) a bug, when you request a URL ending with .html file and a URL parameter.
The bug is that it often serves up an old/stale version of the page from the server.
This is a problem for cache busting, because the whole point of cache busting is that you request a URL with a parameter to get the latest version. e.g. /about.html?version=xxx
The bug doesn't trigger, and works as expected however when you request one of Neocities "clean URLs", e.g. if you request /about?version=xxx the cache busting works as expected.
So, workaround time. This script checks something unique about Neocities (the fact it does the clean URLs thing at all), and if that's the case, I can "normalise" links URLs to their clean variant, where the bug doesn't happen, without breaking other environments/platforms.
✅ Yay it's working as expected. Experiment complete. *returns to project* Well, later after I do all my responsibilities lol.