Unable to fetch iOS webapp files on manifest update. 401 unauthorized
Asked Answered
A

1

7

I have a HTML5 webapp which is running perfectly when served via the IIS without authentication.

Is is using a cache.manifest file.

Both when running in safari, and as an "add to homescreen" fullscreen app, once I update the manifest file on the server, and the app will update.

When I turn on authentication on all files except the cache.manifest, then I only see the update when running it in the safari browser.

If I add it to the homescreen, I am not able to make the app update the cache.

If I wireshark the traffic on the server, I can see the manifest file is fetched without problems, but all the files in the manifest file hits a 401 Unautorized error.

Any idea how I can fix this? Running it in the safari browser is working..

Any help is highly appreciated.

Atwood answered 23/11, 2012 at 15:55 Comment(1)
Anyone out there, who might be able to give me a hint on how to fix this?Atwood
B
4

Safari is much more aware of HTTP Basic Auth, but web.app (the home screen web app handler, which is basically a UIWebView wrapper) isn't as full-featured and doesn't appear to support basic auth.

It seems you may need to work around this with either a server-side solution to append an authentication key to the filename (such as application.css?longhexkey) to bypass basic auth, or go with a more traditional login form (which may require significant changes to your app)

Same issue on Sencha forums: Unanswered: Forcing re-authentication after offline usage on iOS devices?

Basic answered 23/1, 2013 at 0:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.