如何在移动浏览器中打开站点时添加到主屏幕弹出 [英] How to get Add to Home Screen Pop up on Site Open in mobile browser

查看:26
本文介绍了如何在移动浏览器中打开站点时添加到主屏幕弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在手机浏览器中弹出这个添加到主页"将在手机主屏幕上创建带有网站链接的 chrome 图标.

请提出解决方案.

解决方案

官方要求是:

<块引用>

当您的应用满足以下条件时,Chrome 会自动显示横幅:

  • 有一个

    How to get this pop up in mobile browser "Add to home" will create icon of chrome on home screen of mobile with site link on mobile.

    Please suggest the solution.

    解决方案

    Official requirements are:

    Chrome automatically displays the banner when your app meets the following criteria:

    • Has a web app manifest file with:
      • a short_name (used on the home screen)
      • a name (used in the banner)
      • a 144x144 png icon (the icon declarations must include a mime type of image/png)
      • a start_url that loads
    • Has a service worker registered on your site.
    • Is served over HTTPS (a requirement for using service worker).
    • Is visited at least twice, with at least five minutes between visits.

    source: https://developers.google.com/web/fundamentals/engage-and-retain/app-install-banners/

    You can skip these requirements for testing or debugging purposes by enabling a chrome flag:

    chrome://flags/#bypass-app-banner-engagement-checks

    这篇关于如何在移动浏览器中打开站点时添加到主屏幕弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆