Android browser ignores cache manifest on mobile device (Galaxy S3)

老子叫甜甜 提交于 2020-01-03 04:35:14

问题


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.


回答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



来源:https://stackoverflow.com/questions/13241796/android-browser-ignores-cache-manifest-on-mobile-device-galaxy-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!