Difference between revisions of "Add to Home Screen"

From MgmtWiki
Jump to: navigation, search
(Problems)
(Solutions)
 
(3 intermediate revisions by the same user not shown)
Line 13: Line 13:
  
 
==Solutions==
 
==Solutions==
* [https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen Instructions from Mozilla/Firefox] on enabling A2HS if the event 'beforeinstallprompt' is supported. In 2019 [https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent Microsoft Edge, Google Chrome and Samsung Internet have that native event] which triggers if the site meets a minimum set of PWA requirements. The event includes a prompt object, but it can only be used in response to a user action, i.e., click.
+
* [https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Add_to_home_screen Instructions from Mozilla/Firefox] on enabling A2HS if the event 'beforeinstallprompt' is supported. In 2019 [https://developer.mozilla.org/en-US/docs/Web/API/BeforeInstallPromptEvent Microsoft Edge, Google Chrome and Samsung Internet have that native event] which triggers if the site meets a minimum set of PWA requirements. The event includes a prompt object, but it can only be used in response to a user gesture, e.g., click, swipe, vocal command.
  
 
==References==
 
==References==
 +
* [https://developers.google.com/web/ilt/pwa/introduction-to-service-worker Introduction to Service Workers] Android.
  
 
[[Category: Best Practice]]
 
[[Category: Best Practice]]
 +
[[Category: Browser]]

Latest revision as of 13:46, 22 October 2024

Full Title or Meme

Add to Home Screen is a feature of mobile computing devices that enables Progressive Web Apps to be available on the device's home screen.

Context

  • The objective of the Progressive Web App is to duplicate nearly all of the functionality of a Native App which includes the ability of the user to access the app from their computing device, such as a Smartphone.
  • Like most web traffic in 2020 is secured with HTTPS and this feature requires HTTPS to be the transport layer.

Problems

  • The primary target of the PWA is the mobile Smartphone which has limited capabilities, in particular memory and battery energy. The impact to any resource on the Smartphone it is subject to removal to allow the phone functionality to operate unhindered.
  • Apple has taken the position in 2021 to remove any PWA that has not been used for (in practice) 2 weeks, but does not apply that same automatic removal to PWAs that have been added by the user to their home screen.
  • Make sure that the manifest.webmanifest file is downloaded as MIME type application/manifest+json if you get and error on the console like "The script has an unsupported MIME type ('text/html')."
  • Safari is the only browser allowed on iOS. Chrome, Edge, FireFox on iOS are all pseudo browsers, not real ones. They just use a webview so you can sync passwords and favorites. Don't expect this feature to work on iPhone etc.

Solutions

References