Cache (/ˈkæʃ/) is a component that transparently stores data so that future requests for that data can be served faster.
Expires & Cache-Control: max-ageLast-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.applicationCachechecking, downloading, progress, cachednoupdate, updateready.swapCache()File/Blob, FileList, FileReaderBlob, FileWriterDirectoryReader, 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 storage
window.addEventListener(
"storage", function(
key,
oldValue,
newValue,
url
){}, false)