| Summary: | In standalone mode (PWA), page won't load when navigation preload is enabled | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Howard Wu <howu> | ||||
| Component: | Service Workers | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED WORKSFORME | ||||||
| Severity: | Normal | CC: | achristensen, cdumez, jameshoward, smoley, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 15 | ||||||
| Hardware: | iPhone / iPad | ||||||
| OS: | iOS 15 | ||||||
| Attachments: |
|
||||||
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 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? I am not able to reproduce this on iOS 15.4 beta 4 either. Thanks for the update! |
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