0

I have a web application in which I am using a cache manifest. In short, when I modify the cache manifest, all browsers EXCEPT Android (Galaxy S3) will fetch the new files and update the cache. It works just as expected with Iphone and desktop Chrome/Safari browsers. Even if I download Chrome onto the S3, it works fine.

It almost seems that the device is even caching the manifest file so that it appears to not have changed. I'm not sure.

Does anyone have any ideas as to why this may be happening ? or a programmatic way to get this to work ?

Thanks in advance!

Here is the code (cache.appcache). the manifest file lies in the root of my project:

CACHE MANIFEST
# b749e3a4d167d44f1404d777732b5bjkjkf05207c59ab7ca
index.html
app.js

FALLBACK:


NETWORK:
*

My index.html 'html' tag looks like this:

<!DOCTYPE HTML>
<html manifest="cache.appcache" lang="en-US">

That's it for the manifest. In my JS code, I just have an an event which listens for the 'updateready' event when a new manifest is detected. In all browsers, that event fires when i change the 'version' of the manifest, and the new code is fetched. In the default android browser, it does not fire after modifying the manifest, and I can see that the new code is not being fetched.

29er
  • 8,595
  • 12
  • 48
  • 65
  • Have you tested in other browsers in the S3? Try Firefox and Opera Mobile and post your results. There were some bugs on Android HTML implementarion on Froyo ages but don't know in ICS/JB ones. – rgrocha Nov 05 '12 at 23:15
  • yea , i just downloaded Chrome onto the S3 and it works fine, so it appears isolated to the default browser..:( any ideas ? – 29er Nov 06 '12 at 00:05
  • See http://code.google.com/p/android/issues/detail?id=12128 and check if apply to your case. As I said, it's from Froyo, but still open :-( – rgrocha Nov 06 '12 at 00:15
  • @rgrocha: The issue you cite has nothing to do with 29er's problem. It refers to browsers *not* using the cache; 29er's problem is that the browser *only* uses the cache. – CommonsWare Nov 06 '12 at 01:27
  • @29er: If you can publish something that demonstrates the problem, it would help people in determining the source of your difficulty. As it stands, we have no idea what your cache manifest looks like, what sorts of changes you are making to it, etc. – CommonsWare Nov 06 '12 at 01:28
  • just a sec...trying to reply with code but very hard to do in these comment boxes ! I don't any other option but to 'answer my own question', which is strange... – 29er Nov 06 '12 at 16:14

1 Answers1

1

Well just for kicks I changed the name of the manifest file from 'cache.appCache' to 'cache.manifest' and it worked ! Very odd considering that shouldn't matter . :0

29er
  • 8,595
  • 12
  • 48
  • 65
  • Unless perhaps your server was set to use the content type text/cache-manifest for files ending in .manifest, and not for files ending in appCache. – Jon Hanna Feb 13 '15 at 16:38
  • .manifest is the recommended suffix, but yes probably due to the mime type setting on your server – Nico Westerdale Aug 06 '16 at 01:01