Set default iOS web clip icon title?

前端 未结 2 1328
南笙
南笙 2021-02-04 04:51

Is it possible to set a default title or override the generated title for when a user is in Safari on their iOS device and clicks \"Add to Home Screen\"?

I imagine this

相关标签:
2条回答
  • 2021-02-04 05:11

    In iOS 6 it is now possible to manually set a default web clip title using the following undocumented meta tag:

    <meta name="apple-mobile-web-app-title" content="[your title]" />
    

    Thanks to Max Firtman for covering this in his article on the iPhone 5 and iOS 6 for HTML5 developers.

    0 讨论(0)
  • 2021-02-04 05:15

    When you "Add to Home Screen", iOS only looks at the <title></title> on your page. It truncates the title so that it's short enough to show the whole thing below the icon without having "..." in the middle of it. That's not something you can change, but you can adapt to it by changing your <title></title> if the user opens the page in iOS using server-side code or JavaScript.

    More information about web apps are in the Apple docs are here: https://developer.apple.com/library/safari/#codinghowtos/Mobile/UserExperience/_index.html

    0 讨论(0)
提交回复
热议问题