NoState Prefetch for background WebApp installations

34 views
Skip to first unread message

Mustapha Jaber

unread,
Mar 4, 2025, 7:59:19 PMMar 4
to pwa-dev
Hi,

I was wondering if we ever considered using NoState Prefetch for background WebApp installation scenarios like Policy app installations. Given that we only need to load PWA manifest and resources associated with it, using NoState Prefetch would help reduce memory used by background WebContents that we create to accomplish this task today. 

This came up as we were looking into performance impact of background installs in Edge. Would love to learn more if this was ever considered as an option.

Thanks,
Mustapha

Daniel Murphy

unread,
Mar 4, 2025, 8:37:17 PMMar 4
to Mustapha Jaber, pwa-dev
This is an interesting idea! So then we would be able to see the manifest link without actually executing things like javascript.

I would likely expect this to be an 'early exit optimization', as often sites dynamically add the manifest link in the html from javascript.

Do you think it would be possible to:
  • Start with a nostate prefetch when installing pwas from policy/sync.
  • Try to find a manifest link in that
  • If not, then do the full load before trying manifest link check again


--
You received this message because you are subscribed to the Google Groups "pwa-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pwa-dev+u...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/pwa-dev/a208ca05-0924-441c-a60c-7cc0c8028b8an%40chromium.org.
Message has been deleted
Message has been deleted

Mustapha Jaber

unread,
Mar 5, 2025, 1:45:40 PMMar 5
to pwa-dev, Daniel Murphy, pwa-dev, Mustapha Jaber
Good point about sites that dynamically add manifest. I'm not familiar yet with NoState Prefetch content and if it's possible to enable JavaScript for it or if we'd have to spin up a new content to load page with JavaScript enabled. Do we have any data on percentage of sites that dynamically add manifest vs static manifest entry? That will probably help determine if it's worth making this optimization.

Daniel Murphy

unread,
Mar 5, 2025, 4:33:31 PMMar 5
to Mustapha Jaber, pwa-dev
I believe if we log the InstallableStatusCode appropriately, then the relevant code is MANIFEST_URL_CHANGED. I think this is recorded... sometimes in AppBanners.InstallableStatusCode?

I would guess that is accurate? Our UMA shows we hit that at about 0.25% of the time. I'm not sure if it's undercounted or there is bias. - you can look at where we record that UMA here.

Daniel Murphy

unread,
Mar 5, 2025, 4:39:25 PMMar 5
to Mustapha Jaber, pwa-dev
Also, there is possible strong bias here as most of the policy installs are going to be on devices that don't upload UMA (I believe most admin users have uma reporting off by default). So - we don't actually know the occurrence of this happening for the sites that matter most. I think the most we can say is that "this happens".
Message has been deleted

Mustapha Jaber

unread,
Mar 7, 2025, 9:18:03 AMMar 7
to pwa-dev, Daniel Murphy, pwa-dev, Mustapha Jaber
Ok, looks like it would be worth prototyping this maybe behind a feature flag and flight it to see how often we end up having to spin up full content of the page. Created this feature request bug here:  Use NoState Prefetch for background WebApp installations [401039562] - Chromium
Reply all
Reply to author
Forward
0 new messages