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

caveats? #22

Closed
tisdall opened this issue Jan 15, 2019 · 6 comments
Closed

caveats? #22

tisdall opened this issue Jan 15, 2019 · 6 comments

Comments

@tisdall
Copy link

tisdall commented Jan 15, 2019

I'm wondering if there should be a list of short-comings that this library can't handle. For example, "start_url" won't be used in iOS and it just uses the current URL. Also, all regular web links in iOS are opened in a new Safari window and the "scope" value is ignored. (apparently some of these things are fixed in newer version of iOS that support a web manifest, but I'm curious how that handles both a manifest and the meta attributes being set... unfortunately I have no way of testing it)

@samthor
Copy link
Contributor

samthor commented Jan 18, 2019

Thanks, I'll look at this and make it clear in the README.

@tisdall
Copy link
Author

tisdall commented Jan 18, 2019

If I remember correctly, most of the issues I mentioned are iOS 11.2 and earlier as 11.3 started using the Web App Manifest. Also, you may want to mention and link to https://gist.github.com/kylebarrow/1042026 as a possible "hack" to allow regular web links to not open in a new window, however when I tried it I had issues with it working in all cases.

@samthor
Copy link
Contributor

samthor commented Jan 31, 2019

I've added notes on caveats.

by the way, "start_url" should work fine in iOS—as of iOS 11.3, it's actually read and respected from the manifest properly. See tracking issue.

@samthor samthor closed this as completed Jan 31, 2019
@tisdall
Copy link
Author

tisdall commented Jan 31, 2019

@samthor - I really think 'start_url' being ignored should also be included in the README. It essentially ignores that and uses whatever the current URL is.

Thanks for including the section, I hope it helps others out!

@samthor
Copy link
Contributor

samthor commented Jan 31, 2019

Sure, but it's fixed as of iOS 11.3. So I can include the caveat for users before that version of iOS.

There is also a sort of fix for this, which I used to provide in PWACompat v1, but it was less relevant going forward. You use localStorage and navigator.standalone to see if you're the first page loaded, and then redirect. I could bring that back, or maybe generate a CE that your page could listen to.

@tisdall
Copy link
Author

tisdall commented Feb 4, 2019

For me, I just saw how broken 11.2 was and decided against even trying to support it. Most polyfill libraries make it so you get all the functionality you expect without having to worry about it, but there's a pretty big gap between 11.3 and 11.2 even with this library. For me, it'd be helpful to know those pitfalls when reading the README instead of discovering them afterwards.

The changes you made are good, I just think you should also mention the start_url issue, too. The solution you mention sounds promising, but maybe a link to gist with the code would be better than including it in this code base. That solution first requires hitting the initial page which may do something on the server that's not desired (so it may cause unforeseen issues if the developer doesn't know or understand what it's doing.).

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