Cache (/ˈkæʃ/) is a component that transparently stores data so that future requests for that data can be served faster.
Expires
& Cache-Control: max-age
Last-Modified
& ETag
CACHE MANIFEST
#2012-11-17:v1
CACHE:
/favicon.ico
index.html
stylesheet.css
main.js
NETWORK:
/login
/api
FALLBACK:
/main.сgi/static.html
images/large/images/offline.jpg
*.html/offline.html
window.applicationCache
checking
, downloading
, progress
, cached
noupdate
, updateready
.swapCache()
File/Blob
, FileList
, FileReader
Blob
, FileWriter
DirectoryReader
, FileEntry/DirectoryEntry
, LocalFileSystem
window.requestFileSystem(
type, // TEMPORARY || PERSISTENT
size, // storage size in bytes
successCallback,
errorCallback
)
length
storage sizekey(index)
returns key by indexgetItem(key)
returns item by keysetItem(key, value)
sets/updatesremoveItem(key)
removes item by keyclear()
flushes storagewindow.addEventListener(
"storage", function(
key,
oldValue,
newValue,
url
){}, false)