Peter I have a similar issue with my web-app
The webapp starts in the browser then checks its version on my server.
If its version does not correspond (old cached version) it pops up a window telling the custumer to press Ctrl F5 to force the browser to get a fresh version.
This works fine. However... on an android browser (smartphone or tablet) there is no ctrl F5 or any other quick way to clear cached version of a page and force loading fresh one.
<Files myspiderbasicwebapp.html>
<IfModule mod_headers.c>
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
Header Unset ETag
</IfModule>
FileETag None
</Files>
Or you could put a simple PHP wrapper around the download of your file, and let php send the no-caching headers.
Greets, hoerbie
Thanks Hoerbie,
My server is indeed an apache and I will keep the .htaccess settings in mind and try that later...
However Paul mentioned that evendough you prevent the html page to be cached the called jave scripts still are !!!!
I think you can use the htaccess way also to stop caching of the SB .js file of Peters tip.
If the SB .js file is in the same directory as the .html file, then the first block of my last post should help (but maybe is to much).
Or you simply can make a second "Files" block for the main .js file, or you can use one "FilesMatch" block for the .html and the .js file.
We have our own servers with a full self setup apache conf, and we never had problems.
I found another solution.
My webapp now starts in two stages.
1) Never changing url that calls a small app that checks my server for the current name of the main app.
whitch has its version number append to its name.
2) The small app finally calls the main app.
This way if I make version changes the name changes too and it can never be in one's cache.
However still having problems with cached images that may change but keep the same name !!!
So... I may have to consider your .htaccess suggestions anyway
Thans