Game Development Reference
In-Depth Information
Note
When using offline application cache on your games, make sure to keep an open
eye on your browser's JavaScript console. If anything goes wrong at all, such as
finding the manifest file, parsing the manifest, or loading any of the resources de-
scribed in the manifest, the browser will let you know that something went wrong
by raising an exception, but it will go on. Unlike most fatal JavaScript exceptions,
a fatal offline application cache exception doesn't stop or influence the execu-
tion of the script that initiated the caching process. Thus, you may be getting app
cache exceptions and not know it, so get acquainted with whatever developer
tools your browser supports, and make good of it.
The rest of the manifest can be divided into three main categories, namely, assets
to be cached, assets to never be cached, and the fallback asset. Comments can be
placed anywhere within the file, and are denoted by a pound sign. The entire line
following a pound sign is ignored by the manifest parser.
CACHE MANIFEST
# HTML5 Snake, Version 1.0.0
CACHE:
index.html
js/next-empty.worker.js
js/renderer.class.js
js/snake.class.js
img/block-green.png
img/fruit-01.png
fonts/geo.woff
fonts/vt323.woff
css/style.css
NETWORK:
*
Search WWH ::




Custom Search