I have a website. Let's call it www.example.com
.
I load an iframe in www.example.com
which is a PWA.
Is it possible to install the PWA in the iframe? If not, why?
How to install Progressive Web Apps on iPhone. 1 1) Tap the Share button in Safari for the PWA you’re using. 2 2) Tap the icon labeled Add to Home Screen. 3 3) Tap Add in the upper-right corner. 4 4) Now name your PWA so that it’s distinguishable from its native counterpart on the Home screen and in Search, then tap Add in the upper-right corner.
Thanks to modern web technologies like HTML5, Progressive Web Apps run in a browser, don’t require separate distribution, combine features of native apps with the benefits of a mobile experience and let you keep them on the Home screen without the hassle of an app store.
PWAs on the iOS platform require HTML5 features like the Web App Manifest specification and Service Workers so that they can use crucial background scripts. Mobile web developer Maximiliano Firtman has a detailed overview of PWAs and their support in Safari across Apple’s platforms, if you’re interested.
Since PWAs live on the web, they take up far less room on your device than installed native apps. And, while many PWAs store information for offline access, they're still far less space-intensive than comparable native apps. For example, Starbucks offers a PWA that's over 99% smaller than its native iOS app.
It's not clear what you mean by "install".
If you're asking whether an <iframe>
can register a service worker, the answer is yes. That service worker will have its install
/activate
handlers fired in the same manner as it would as if it were a top-level document that registered the <iframe>
. Just to be clear, the service worker and cache storage will be scoped to the origin of the <iframe>
, not the top-level document.
If you're talking about whether loading a document in an <iframe>
can meet the requirements for showing the "Add to Homescreen" UI in Chrome, the answer is no. The beforeinstallprompt
event should not be fired in that scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With