简体   繁体   中英

Apple add icon to home screen open in Safari only

I have created numerous resolutions of apple-touch-icon for my website. This means when someone adds my website to their Apple device Home Screen it has that icon. However when you click the icon it opens in a standalone window, rather than in the Safari browser.

I have tried using <meta name="apple-mobile-web-app-capable" content="no"> but this doesn't seem to do anything.

Is there a way of preventing this from happening and make the webpage open in Safari only?

I think I found a way. Remove these lines from <head> section:

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

And remove minimal-ui from:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">

(if defined)

Here is the source: https://discussions.apple.com/thread/5967053?tstart=0

If your app doesn't have that <meta> tags it should open directly inside Safari (at least mine does).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM