Displaying data from database when offline - Webdev
Is there a way to display data from database offline? it doesn't need to be in real time so basically you can have it whenever you connect to the site and you're online it stores an offline version of the website, this must include images, data from database, stylesheet pretty much how it would look like when you're online but just don't show realtime data.
the requirements are to have it work on all platforms, effecient, secure and to have html5 support. The data will be collected through php and displayed in html.
I was planning on using appcache but since that would get files from the server (direct files) and cache them this wouldn't work if you were to display data from databases, so each individual user will have unique data being shown depending on what is shown in the database.
The html5 canvas functionality must work aswell
You can use browser cache to keep the item. Like localstorage or Index db cache storage. For images you make it as a bytes and keep it all the time.
Since you are targetting html5, you can use localstorage to store files online.
That woyld mean it's very different than what you would do usually. So to avoid having to do 2 versions, you could make the online version exactly like the offline one, and check if online, reload, else use directly.
And keep in mind that you have limited space when using that approach (I think the limit depends on the browsers)