RolePlay onLine RPoL Logo

, welcome to Technical Discussions

11:46, 27th April 2024 (GMT+0)

Cached Game Maps.

Posted by ionathas
ionathas
member, 26 posts
RPG & Fiction Writer
Sun 10 Sep 2023
at 23:11
  • msg #1

Cached Game Maps

Hi.
When we upload an image into the game maps, it gives the file an identifier based on the game and group numbers. Our browsers cache the image so they don't have to reload it every single time we open the file.
Bandwidth saved. Yay!

... except when a map gets updated. Since the browser doesn't realize the image file for the group has changed, it relies on the old, cached version of the file and doesn't bother to download the new map. Which means that you can't see the new version of the map, and since the browser doesn't realize the map has changed, it has no way to tell you you're looking at an old version of the map. So, even if you knew somehow that the map HAD changed, you'd have to empty the page's cache so your browser would know to download the new version of the image file.

So.
Would it be possible to add a version number or timestamp or the version's filename to the image filename so the web browser wouldn't just use its cache every time it hits the Maps page? Or if there's a good way to force a reload, that might work... although performance would also suffer on large maps, so... not an ideal solution.

Thanks for your hard work!
Skald
moderator, 997 posts
Whatever it is,
I'm against it
Thu 14 Sep 2023
at 07:23
  • msg #2

Cached Game Maps

I believe that the use of the cache is controlled by the browser settings.

For Firefox (my weapon of choice), you can manually change the setting by following the instructions below (in a nutshell, you need to go to about:config and then search for and modify the browser.cache.check_doc_frequency value):

https://support.mozilla.org/en-US/questions/1203480

Or you can just press CTRL+F5 to force a page refresh and reload images from scratch.

There'll undoubtedly be similar settings in Edge/Chrome etc.
ionathas
member, 27 posts
RPG & Fiction Writer
Fri 15 Sep 2023
at 04:19
  • msg #3

Cached Game Maps

In reply to Skald (msg # 2):

Yeah. I don't actually want my browser to stop caching all images as I use a hotspot for connection sometimes, and I haven't found a way yet to convince my browser to not store caches on a per-site basis... although, frankly, that sounds like an awesome plug-in I should probably go ahead and write. lol
CTRL+F5, of course, is a solution as long as you know the cache is out of date...

Eh, it's fine. I'll just write a browser extension for it. Thanks anyway! :)
Sign In