RESOLVED WORKSFORME 236483
In standalone mode (PWA), page won't load when navigation preload is enabled
https://bugs.webkit.org/show_bug.cgi?id=236483
Summary In standalone mode (PWA), page won't load when navigation preload is enabled
Howard Wu
Reported 2022-02-10 21:42:16 PST
Created attachment 451639 [details] Minimal test page On iOS 15.4 (beta), when a page runs in standalone mode with navigation preload enabled, the `preloadResponse` of the navigation request to `start_url` is a 200 with an empty response body. If the service worker responds to the navigation request with this empty `preloadResponse`, the site cannot be loaded and the app results in a blank white screen. This issue is not observed in non-standalone mode, nor in OS versions lower than 15.4. Attached is a minimal test page that exhibits the issue. Repro steps: 1. Create a standalone homescreen icon to the attached site (on devices/simulators running iOS 15.4) 2. Open the homescreen icon and observe that the page is loaded 3. Swipe out the page and open it again (this time service worker is activated) 4. Observe that the page is not loaded
Attachments
Minimal test page (2.80 KB, application/zip)
2022-02-10 21:42 PST, Howard Wu
no flags
Radar WebKit Bug Importer
Comment 1 2022-02-14 19:54:46 PST
Howard Wu
Comment 2 2022-02-14 20:17:02 PST
After playing with the minimal test page more, I found that sometimes the issue can be reproduced in non-standalone mode as well. Unlike in standalone mode where this issue always happens, in non-standalone mode, it doesn't always fall into this problematic state. However, once I reproduce this issue in non-standalone, opening a new tab and navigating to the page would always result in this issue. I cannot find a proper way to fix/workaround this issue, and would appreciate if you could shed some light on this. I uploaded the test page for your convenience. https://wuchenhao.github.io/empty-preload-response/index.html
Smoley
Comment 3 2022-02-25 12:20:33 PST
Thanks for filing, I've not been able to reproduce this on iOS 15.4 beta 4 (19E5235a) in a standalone PWA. Are you still seeing this on the latest beta?
Howard Wu
Comment 4 2022-02-28 22:15:12 PST
I am not able to reproduce this on iOS 15.4 beta 4 either. Thanks for the update!
Note You need to log in before you can comment on or make changes to this bug.