3

I have created numerous resolutions of apple-touch-iconfor 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?

Callum Watkins
  • 2,844
  • 4
  • 29
  • 49
  • i think your looking for user agent – Dr Upvote Jun 24 '15 at 18:53
  • @COOOL What is that and how do I use it? – Callum Watkins Jun 24 '15 at 18:54
  • well you use user agent to determine the users browser -- but in your case it sounds like you trying to do something like this; which seems impractical -- > http://superuser.com/questions/384637/specific-browser-for-specific-links – Dr Upvote Jun 24 '15 at 18:56
  • @YourConscious I'm not sure you completely understand what is happening. When a user adds my website to their iPhone/iPad home screen by pressing the "share" button then "Add to Home Screen" it opens as a standalone window/tab, rather than in Safari their browser. – Callum Watkins Jun 27 '15 at 09:23

1 Answers1

3

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).

jmarceli
  • 19,102
  • 6
  • 69
  • 67