Reputation: 2252
I'm trying to create an offline version of a test web app. This far it had been working perfectly on Chrome and Firefox where I do most of my tests. Meaning I can go to the page, the console is all good, and then when I unplug my ethernet cable (I'm hardcore like that) I can see still all of my page content in browser and in chrome://appcache-internals
Problems arise when I try to test it on the iPad, I go to my webpage, but then when going into Airplane mode it refuses to access the page saying I need an internet connection. So I decided to test on Safari (mac) which is the closest I have, and I do see an error in the console on the cache.manifest mime-type : Application Cache manifest had an incorrect MIME type: text/plain.
Problem is, I do have a .htaccess and it does specify AddType text/cache-manifest appcache manifest
, but no. Even when I use a web sniffer on my cache.manifest file it comes out as text/plain, which I think might be the reason it's not getting read on the iPad/Safari.
Anyone can help me on this thing ? I'm completely stuck right now.
Upvotes: 2
Views: 3629
Reputation: 654
add to your manifest file NETWORK and FALLBACK blocks so it will look like this:
CACHE MANIFEST
# Version 1.0
NETWORK:
*
CACHE:
index.html
FALLBACK:
Upvotes: 2
Reputation: 1
Check if you have Private Browsing enabled in Safari on your iPad:
Settings -> Safari -> Private Browsing
If it is enabled, disable it. When Private Browsing is enabled all cookies and other caching is disabled.
I had a similar problem. My app worked fine with internet disconnected both on Safari and Firefox running on the iMac and even on the iPhone in airplane mode. But when I tried to load it on the iPad in Airplane mode it just wouldn't work. When I turned off Private Browsing it worked! Still got the notice about turning off Aerplane Mode though. But it was possible to browse the App.
Upvotes: 0