Make injected meta tags configurable and change defaults #961
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change proposes 2 things:
The reasoning for these changes have to do with the fact that those are nonstandard meta tags and many people do not fully understand what they are opting in to by setting "apple-mobile-web-app-capable" to "no". This article does a great job of explaining it, but essentially iOS versions before 11.3 use those tags to determine if they should be in "standalone" mode. But iOS < 11.3 has no back button, service worker, or even the ability to store history state when "apple-mobile-web-app-capable" is "yes". It is generally a good idea to just not do it.
Now that iOS 11.3 is properly supporting progressive web apps, it makes sense to only support PWAs in iOS 11.3+. All previous versions should opt out of Apple's nonstandard standalone mode. I think the default should be opt-out because it's the best practice, but the final decision should be left up to the user, thus why I want to make it configurable.
I also set the "apple-mobile-web-app-status-bar-style" to "default" because on iOS 11.3, it will show a black bar even when there is a manifest.json. By setting it default, it will be a white background. The black background looks especially weird on the iPhone X. I think it's more likely that people will have a white background then black, so this seems like a better default. Of course, ideally the developer can change it.