(Mobile) Safari loading resources despite cache manifest - html

I've been developing a web app that uses the offline cache, partly as a way to reduce the number of calls made to the server while in use.
I was hoping to have the login page load and cache all the resources such that all pages behind the login would not have to.
What I'm noticing from the server logs is that although all the resources (images, stylesheets, javascript files) in the manifest are requested when the login page loads, after the user has logged in, and redirected to, say, /workspace/, Safari (both desktop and mobile) seems to request the the stylesheets and javascript files listed in /workspace/ again, resulting in a HTTP 304 from the server.
While the load in serving a 304 is minimal, I'd like like to know if there was a way to avoid those. I tested the same code in Chrome (dev channel), and Chrome only requests the cache manifest again after login, and that's it.
Would appreciate any thoughts! Thanks in advance!

I have noticed in my offline app that the host page (the one with the manifest tag in it) must be in the manifest file as well (only in iPhone iOS since 4.3), this to support startup in airline / offline mode.
Perhaps this has something to do with your problem as well.
I had a problem with the offline mode in iOS 4.3
(read this for more insight in the 4.3 issue http://www.theregister.co.uk/2011/03/15/apple_ios_throttles_web_apps_on_home_screen/) however when I updated to 4.3.2 it worked again.

I have found an interesting situation with iOS 4.3.3. I have an HTML5 offline app that worked in iOS 4.2 on iPad. But I updated my iPad to iOS 4.3.1, it can no longer run in offline mode from the Home Screen. However, when I saw that "user593037" say that it was working on iOS 4.3.2, I updated my iPad again and today, its at iOS 4.3.3.
Initially my offline app still did not work offline. So I went back to the MOST basic offline web page and I used "cache.manifest" as the manifest file name it worked. So, it seems that on iOS 4.3.3 the offline caching will only work if that is the file name used for the cache manifest. I even tried with a file name of cache2.manifest and it will fail to run offline.
And you can also run it full screen with the "apple-mobile-web-app-capable" set to "yes".

Related

PWA lighthouse audit always fails on offline test

I have this PWA : mesmenus that installs well on desktop and mobile and works offline.
But lighthouse auditing keeps satting that current and start-url pages does not respond with a "200 OK".
I can't undertsand it as it works ok once installed and offline.
All the lighthouse auditing is fine except these 2 points.
I bet there is something special to do to make it work while in Chrome and offline but can't find any doc on google about this.
Source code can be found here github weekmenus It uses svelte js
I've also tried using workbox with no luck.

Facebook mbasic site, mobile safari, home screen shortcuts and local storage

I have a question about the mbasic.facebook.com page and how they manage to do what they do on iPhone with iOS 12.3.1. This is not about the facebook app. I don't have it installed at all.
I went to mbasic.facebook.com in mobile safari on iOS and created a shortcut for it on my homescreen. When I use the shortcut, the page behaves like what Apple calls a web application, i.e. it does not have the usual mobile safari UI.
Here's the weird part:
After using the shortcut and logging in, I switch to the settings app and under "Safari", I delete the browser history and website data.
I then use the shortcut again to launch the mbasic facebook site.
I am greeted with a screen where I still appear to be logged in. If i interact with the page it will make me login again, however.
This makes me wonder about two things:
How does the web application maintain its state (i.e. still know who am i) despite me trying to delete the Safari data?
How do I delete the data in a way that also affects a "web app" launched via a home screen shortcut?
I am not sure exactly. But I think it was done by PWA(Progressive Web App) technology. It helps you to use a website as an app that are installed from app store. And it also has the ability of state maintaining, giving push notification, maintain own storage in your device. When you installed it, all your login information was saved in your device as its own storage and this storage has no relation with your web browser. That;s why when you delete data from Safari, it made no effects on the installed one. And when you installed it, it installed its own manifest file in your device. That's why it runs on your device with it's own UI not with the safari UI. You can delete its data by deleting its storage folder that is created at the time of installation. I am not sure where you got the file in your device. Make a research on it. Here are some useful link about PWA. MDN web docs - PWA 4 important points to know about Progressive Web Apps (PWA) PWA Tutorial Hope it will help you. You are requested to share any new thing that should be known as I am new in this technology.

Problems with HTML application cache in offline mode when the refresh button is clicked

I have a web app developed with application cache. I am testing it on Windows Phone 8.1 running IE 11 mobile. When the internet connection is turned off the web app loads as expected. My problem is that if I hit the refresh button on the browser when the web app is in offline mode the browser tries to check for an updated manifest file. Since there is no connection it cannot find it and then the cache is rendered in an obsolete state and the browser invalidates the cache. The browser refreshes the web app and then tries to pull the page from the network which fails since I am offline. To summarize, what can I do to prevent the browser from invalidating the application cache on refresh when running in offline mode?
That sounds like a bug to me. Per spec, the applicationCache should only be invalidated (become obsolete) if the request to the *.appcache file returns a 404 or a 410 status. If you are offline, it should instead fail with a status of 0.
I'd suggest to test it with other browsers devices and eventually report it as bug to the IE11 team
Not an answer but my reputation isn't high enough to comment, sorry.
Other people have noticed this too (Why offline web application doesn't work?), so as mentioned already here, it looks like a bug.
Are you testing in the 8.1 release that is available from the Developer Preview app? Or a phone running an official release of 8.1?
I ran into the same problem. I haven't got a solution yet. But i want to list what did NOT work!
Adding IIS Mime Types, as discussed here
Changing .manifest to .appcache, as discussed here
Adding the meta header "cache-control: public" as described here
Also did not work to add the header manually in the webbrowser control of the wp 8.1 cordova web app (in the navigate method).
Deleting the Browser History and local storage in windows phone setting is making the problem even worser
Strangely using developer options in IE and change under the tab emulation to windows phone, the appcache loads succesfull
I hope this list will help other people not to find other solutions.

Chrome v31.0.1650.57 broke my packaged app webviews

I have a packaged app that requires me to be able to view saved, offlined web pages. These pages are downloaded from my server when the user is online and saved to the HTML5 filesystem so that they can be viewed offline. These are pages that cannot be packaged with the app. I have been using a webview to display this content in my app and this worked fine until the Chrome browser updated to v31.0.1650.57 (Nov. 9, 2013 build). Now I am getting 'ERR_FILE_NOT_FOUND' even though the content is definitely at the provided filesystem URL. The webviews still work fine on my two Chromebooks - an Acer running v29 and an HP running v30 - unless I go into developer mode and run in beta (which is v31.0.1650.57) instead of stable.
My question is what changed and how I fix it? Has Chrome tightened up the security to the point where I'll no longer be able to view these offlined web pages? Have new permissions been added that I need to include in my manifest to get my webviews to work again? I already have permissions for 'webview', 'unlimitedStorage', and the appropriate URL permissions for downloading the pages from my server.
My application is supposed to be given to the client around the first of December so this is a major surprise. Thankfully it didn't happen after the app went live.
Thanks in advance for your help.
*Update - I should point out that viewing an external URL such as 'http://stackoverflow.com' works fine. It is the filesystem URLs (filesystem:chrome-extension://[appId]/[pathToFile]) that are no longer working.
**Update 2 - Google has updated their 'webview' docs (https://developer.chrome.com/apps/tags/webview) but I still haven't been able to load filesystem URLs.
Perhaps this addresses your question? https://plus.sandbox.google.com/100132233764003563318/posts/hsNTHvbvEdo

chrome ios application cache does not clear

I'm building a web app with offline capabilities and it doesn't appear that Chrome (iOS) clears localstorage properly. I've cleared all the data in the settings but it keeps using the first version that I tested with.
Clearing the data works fine in Safari so it appears it's an issue with Chrome.
Does anyone know if this is a bug with Chrome on the iOS and localstorage? I'm only using the manifest file at this point.
Thanks for any help or pointers.
You are using mainfest, that means you are using application cache. So have a try https://developer.mozilla.org/en-US/docs/HTML/Using_the_application_cache#Storage_location_and_clearing_the_offline_cache
Or you could modify manifest file to force the browser update the page. By the way local storage is different from application cache.