I started to use HTML5 cache to view a simple HTML page with one css file and two js files.
My problem is that the cache is used whether I’m offline or not. But I just want to use the cache when I’m offline.
Does anyone know how to solve this?
index.html file manifest:
<html manifest="app.cache">
app.cache manifest file:
CACHE MANIFEST
/index.html
/css/style.css
/js/jquery-1.7.1.min.js
/js/functions.min.js
Thank you!
manifest=”app.cache” – not going to solve your problem. It caches all the file listed in manifest file. You have to save your data in local storage or in local db and have to retrieve data from server/local based on connection status [online/offline].