How do I get appcache to work with PHP (or any server side)?
is a good way to cache client-side assets and make them available when the user goes offline. I've been playing with this technology for some time, and so far it works pretty well with static resources, such as
Now I have come to a situation where I need to integrate some functionality
into my application. For simplicity, you can say that mine
// Print the list of task names from the database. printMyTasks();
So I put this cached page inside my file
CACHE MANIFEST #v1.0 show_tasks.php
Now the problem ...
When the user first accesses this page (given that he is online), the browser caches the html page along with the list of tasks that were there at that moment. But after that, even when it doesn't connect to the database and fetches the latest data. Instead, it always shows the cached version that was cached the first time it was run.
I understand that in order to update the client-side cache, you need to make changes to the file itself
(not the data it processes) as well as the file
. (In my case, the change
I am looking for a solution to make my application work in such a way that
If the user is online, read the jobs from the database and show them. (Don't show cached version)
If the user is offline, show the cached version, but also the latest updated data. (Quest list when he last accessed it online)
I have considered the question
Using appcache with php & database
source to share
No one has answered this question yet
See similar questions: