mdbtxt1
mdbtxt2
Proceed to Safety

The Q04B Caching System    

Q04B uses the Application Cache, an HTML5 feature that provides a few benefits, notably the ability to play Q04B offline (after any successful complete load). However, it also adds some complexity and changes the function of the ordinary "reload" command in your browser. This page describes the caching system, and how to use it to your advantage.
  

Options&Info       Return to Game

Version Number and Status

Below the Q04B title you'll usually see a version number and caching status indication, such as "v.10650.95 !". The "!" is the status indication, and there are several possible alternatives:

v.10650.95 ? The browser is checking to see if you have the latest version.

v.10650.95 ! The browser has confirmed that this version is the latest one available at this time.

v.10650.95 dl The browser is downloading the files that comprise Q04B (possibly a new version , if Q04B was already cached).

v.10650.95 dl(27%) The browser has downloaded 27% of the Q04B files.

v.10650.95 dl(100%) Downloading is complete, you may now play Q04B offline.

v.10650.95 C Cached (same as "dl(100%)")

v.10650.95 +U Downloading is complete, and you'll be running the new version the next time you visit, load, or reload the main Q04B page.

v.10650.95 - A hyphen (-) means that you are running Q04B from local files.

v.10650.95 ~ A tilde (~) means that you are running Q04B in a browser that does not implement the HTML5 Application Cache.

v.10650.95 o Obsolete: I have deleted or renamed the "manifest" file that tells the browser how to cache Q04B. You're unlikely to see this, unless I am making fundamental changes to the caching setup.

You may notice that the version number increases, but nothing seems to be different. That is normal; about once a day the version number gets updated even if I did not change anything. This is to "force" older, partially-compliant browsers to load a complete copy of the game in the (fairly rare) event that it failed to load all the files the first time.

Offline Play

For mobile users, the primary benefit of this caching system is the ability to play offline. After you see the "C" (cached), "!" (version is current), or "+U" (update available) status indicators, you may turn off your Wi-Fi, 3G or other internet access, and you'll still be able to play Q04B. You may even close the page or tab and re-open it later, or do a reload, and the game will load and run normally.

Home Screen Icon

If you have an OS that allows saving the game as an icon on the home screen, you should wait until Q04B has fully loaded before attempting to play offline. Note that after creating the home screen icon, the device needs to cache Q04B again. Open the newly-created Q04B icon, and wait until it downloads (showing "C" or "dl(100%)" after the version number).

If you have an Apple device with iOS version 6 or later, the home screen version of Q04B will have a new game (empty grid with just one Cueball and one Megan tile). Your Q04B game is still there, but it's in the Safari browser. To get your game back, follow the Options, Info, & Credits link, then follow the "Return to Game" link on that page, which will take you back to Q04B within Safari. In iOS 6 or later, the home screen icon is useful only if you're willing to start a new Q04B game from scratch and re-earn all the boosts.

Also, in any version of iOS, it seems that following the Options, Info, & Credits link always takes you back to Safari. This makes it impossible to import a game from elsewhere, or to activate newly-earned boosts. I am trying to figure out why this happens and how to make it work. I may have to provide an import/export function within the main Q04B game screen so that you can Export, then use Safari to add the boost, then Import the resulting game back into the home-screen-icon version of Q04B. If I do this, I'll still leave the separate import/export function in Options&Info, which is there to provide an alternative when the main game page is not working.

Caching and the Reload Button

Normally you can use your browser's "reload" button (or menu command) to get the new version of a web page right away. Q04B is a little different.

Most importantly, reloading will not give you a new version unless you have let it download everything. If you reload while it is displaying something like "dl(27%)" after the version number, you'll still have the old version and the browser will have to restart the download from 0%. In some browsers (notably Safari, both on desktop and mobile) this downloading may take as long as 2 minutes. This means you effectively have to reload, wait a few minutes without quitting the browser and without turning off your device, and reload again.

Also, Simply closing the tab/window and then opening a new tab on the game is not a "reload". Even quitting the browser and restarting it doesn't do a "reload", because of the fact that it's cached. In order to "reload" you have to actually use the browser's reload command.

You may "force" a browser to load the newest version of Q04B into the Application Cache by doing an Export, saving your export data somewhere, then emptying your browser cache, cookies, and application data, and then visiting the Q04B page. It's very important that you export first because deleting application data ERASES YOUR SAVED GAME. It will also lose lots of things that might be useful for other websites, like other games. Instead, you might prefer to export your Q04B game and switch to another browser.

Caching on Other Pages

When you are on another Q04B page, such as this one or the Options&Info page or any of the boost descriptions, the browser is checking for an update the same way it does when you visit or reload the main game page. When you return to the game you might find that the version number has gone up and already has the "!" indicator telling that the current version is the latest. You never saw the downloading indicator "dl(27%)" because the downloading happened while you were on the other page.

If Q04B is Broken

Occasionally when opening the Q04B page in your browser you may see a message like the following:
  

Q04B is starting up. If you continue to see this message after

a few seconds, follow this link for instructions on how to recover.

When you see this message, I am updating the game and I have made a mistake. I usually fix these mistakes fairly quickly, but because of the downloading delay (described above), it may take a bit longer for you to recover.

Even though the game is broken, the browser is still trying to download a new version into the Application Cache. But because the game is broken, you probably cannot see the version number or "dl(27%)" indication to see that this is happening. Here are the steps to follow if Q04B seems broken:

Options&Info       Return to Game


References

An article about the HTML5 Application Cache at w3schools.com


Robert Munafo's home pages on AWS    © 1996-2024 Robert P. Munafo.    about    contact
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2015 Aug 19. s.27