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

Make injected meta tags configurable and change defaults #961

Merged
merged 2 commits into from
Apr 25, 2018
Merged

Make injected meta tags configurable and change defaults #961

merged 2 commits into from
Apr 25, 2018

Conversation

jineshshah36
Copy link
Contributor

@jineshshah36 jineshshah36 commented Mar 8, 2018

This change proposes 2 things:

  1. Make apple-mobile-web-app-capable and apple-mobile-web-app-status-bar-style configurable
  2. Change the defaults to "no" and "default", respectively

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.

This change proposes 2 things:

1. Make apple-mobile-web-app-capable and apple-mobile-web-app-status-bar-style configurable
2. Change the defaults to "no" and "default", respectively

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](https://medium.com/@firt/dont-use-ios-web-app-meta-tag-irresponsibly-in-your-progressive-web-apps-85d70f4438cb) 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.
@yyx990803 yyx990803 merged commit 36f954b into vuejs:dev Apr 25, 2018
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

Successfully merging this pull request may close these issues.

2 participants