Ive been developing a HTML5 game using the LimeJS framework. As I am targetting iPhone and iPod Touches I asked my lovely
girlfriend fiance to design me an app icon and hopefully In the near future she will also have give startup images too.
As I dont want to load the icon and startup images via the network every time the app loads, I thought I would cache it “offline”. To do this you need to create a manifest file which your web server needs to set a specific content-type header which is just
To load a
manifest file you need to add an attribute called
manifest that points to your manifest file. It can be a relative path.
1<!DOCTYPE HTML>2<html manifest="mysite.manifest">3...
Here is how the rest of my HTML file looks like
manifest file tells the browser which files to store locally, the syntax for it kind of reminds me of INI files, but not quite. My manifest file looks like following;
This tells the site to cache/store the png image for the app icon. The file listing following the
NETWORK: section tells the browser to always load the files from the network. More info is available in this link
If you are using Nginx like I am, then you need to change the file
mime.types and add the following
Which just tells Nginx to serve up file resources ending with
manifest with the content-type header of
Hope this helps.