Skip to content

Instantly share code, notes, and snippets.

@tobie
Created June 6, 2012 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobie/2881982 to your computer and use it in GitHub Desktop.
Save tobie/2881982 to your computer and use it in GitHub Desktop.
Example manifest files transformed in JSON
// CACHE MANIFEST
// NETWORK:
// comm.cgi
// CACHE:
// style/default.css
// images/sound-icon.png
// images/background.png
{
"network": [
"comm.cgi"
],
"cache": [
"images/sound-icon.png",
"images/background.png",
"style/default.css"
]
}
// CACHE MANIFEST
//
// /main/home
// /main/app.js
// /settings/home
// /settings/app.js
// http://img.example.com/logo.png
// http://img.example.com/check.png
// http://img.example.com/cross.png
//
{
"cache": [
"/main/home",
"/main/app.js",
"/settings/home",
"/settings/app.js",
"http://img.example.com/logo.png",
"http://img.example.com/check.png",
"http://img.example.com/cross.png"
]
}
// CACHE MANIFEST
// FALLBACK:
// / /offline.html
// NETWORK:
// *
{
"fallback": {
"/": "/offline.html"
},
"network": [
"*"
]
}
@tobie
Copy link
Author

tobie commented Jun 14, 2012

Aren't fallbacks ordered?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment