@Dannii is right that the best way to handle scripts, CSS, and other “subresources” of a page is to change the URL every time you deploy, e.g. instead of linking to http://rcveeder.net/moondrop/interpreter/Gibbous%20Grove%20Shopping%20Center.gblorb.js
you’d link to http://rcveeder.net/moondrop/interpreter/Gibbous%20Grove%20Shopping%20Center.gblorb.js?version=7
. Then, when you push a new version, you could change ?version=7
to ?version=8
.
But, as for the question you asked, there’s also an HTTP header called Clear-Site-Data
that can do it.
You’d need to be able to set HTTP response headers; if your site can run PHP, that will do just fine. For example, you could have a page called /clear-site-data
that looks like this:
<?php
header('Clear-Site-Data: "cache"');
?>
<html>
<head><title>Clear Cache</title></head>
<body>Your cache is clear!</body>
</html>
… but that’s not as good as changing the URLs of scripts/stylesheets, because it would still require players to know that they can/should go visit the /clear-site-data
page in order to clear out their cache.
Whereas if you just change the ?version=7
to ?version=8
, players will automatically pick up the new, correct version without having to lift a finger on their part.