Meta Tag “apple-mobile-web-app-capable” for Android?

后端 未结 5 805
忘掉有多难
忘掉有多难 2020-12-23 21:21

Is there a way to create an Android Web Application like on the iPhone?

Using the \"apple-mobile-web-app-capable\" meta tag in the head element of an HTML page, it i

5条回答
  •  执念已碎
    2020-12-23 21:35

    Chrome on Android now supports a meta-tag mobile-web-app-capable:

    Since Chrome M31, you can set up your web app to have an application shortcut icon added to a device's homescreen, and have the app launch in full-screen "app mode" using Chrome for Android’s "Add to homescreen" menu item.

    For details about the mobile-web-app-capable meta-tag, scroll down to "Supporting homescreen-installed apps prior to M39":

    Since M31, Chrome will look for the following meta tag in the element of the web-page (if there's a manifest with display specified, this is ignored):

    The name attribute MUST be "mobile-web-app-capable" and the content attribute must be "yes" (case in-sensitive). If there is any other value in the content attribute the web app will be added as a regular bookmark.

    While I don't have any devices running Chrome M31 that I could test with, I interpret this to mean that full-screen web apps, with an icon on the device's homescreen, are supported as far back as Chrome M31, provided you use that mobile-web-app-capable meta tag.

提交回复
热议问题