Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New tornado version doesn't work as iOS Homescreen Web App #54

Open
gerstl opened this issue Aug 21, 2016 · 5 comments
Open

New tornado version doesn't work as iOS Homescreen Web App #54

gerstl opened this issue Aug 21, 2016 · 5 comments

Comments

@gerstl
Copy link

gerstl commented Aug 21, 2016

I just upgraded to the new tornado version (master branch) of AlarmServer, but this version doesn't seem to work as web app on an iDevice home screen. Used to work before.

I already deleted the icon and re-added it, but when launched as web app, it just shows the black "Alarm Server" banner on top, but otherwise an empty/blank page.

It all works fine in the Safari browser, just not as home screen web app icon.

@gerstl
Copy link
Author

gerstl commented Aug 23, 2016

It looks like the problem may be with Apple's caching policy for web apps, so it would just show some stale/old code/page.

Some Googling suggested to trick iOS into thinking that the page is dynamic (= can't be cached) by appending something like "/?refresh=1" to the URL. That seems to have worked (just be sure to not use "?v=xxx", since that tells tornado to serve a page that enforces caching).

Nevertheless, ideally, this should really be fixed on the server side (by including some appropriate headers to tell iOS about caching policies?!).

juggie pushed a commit that referenced this issue Aug 25, 2016
… with webauthuser/pass always prompting for password even when disabled
@juggie
Copy link
Owner

juggie commented Aug 25, 2016

I don't have an iDevice to test this on, but I think this was due to my use of StaticFileHandler for some stuff. I've overridden it to enforce no-cache. Let me know.

@gerstl
Copy link
Author

gerstl commented Aug 25, 2016

Hard to say. Still doesn't work here for me, but that may have to do with iOS still having the old version cached on my phone. Don't know how to purge the cache for web apps (apparently, that cache is different from Safari's cache, and iOS caches very aggressively for web apps). In other words, I don't understand enough about iOS web app development to really know what to do beyond that...

@juggie
Copy link
Owner

juggie commented Aug 26, 2016

So far as I can tell everything looks good and the no caching headers are properly set. Without a ipad/iphone/etc to test on, I can't provide any further help. I'd be happy to make the required changes if I knew what they were.

@gerstl
Copy link
Author

gerstl commented Aug 26, 2016

I am in the same boat, wouldn't know what is needed otherwise. The solution with using a link that includes a "/index.html?refresh=xxx" works for me, so I am good (BTW, note: for some odd reason, the workaround only works around for me if I explicitly link to index.html, just doing "/?refresh=xxx" didn't do it for me).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants