[Webkit-unassigned] [Bug 238564] New: Service-Worker-Navigation-Preloader header not being sent when Navigation Preload is enabled.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 30 11:53:00 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=238564

            Bug ID: 238564
           Summary: Service-Worker-Navigation-Preloader header not being
                    sent when Navigation Preload is enabled.
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Service Workers
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jlwagner at google.com

Overview:

I'm currently working on a Workbox-powered service worker for my personal website that uses streams to precache header and footer markup and combine those precached bits of markup with content partials provided by a PHP back end for faster loading performance. I'm using Navigation Preload in this mix, and have noted that the Service-Worker-Navigation-Preload header (https://developer.mozilla.org/docs/Web/HTTP/Headers/Service-Worker-Navigation-Preload) is not being sent.

This header is important for application back ends because, at least in the context of streaming partial responses, it's important to have a signal from the client that lets us know if we need to send partial content. This is where the Service-Worker-Navigation-Preload test header comes in, and it appears that Safari 15.4 (and release 142 of Safari Technical Preview) are not sending this header when Navigation Preload is enabled.

Steps to reproduce:

1. Open Safari 15.4
2. Go to Developer > Experimental Features and ensure "Service Worker Navigation Preload" is enabled.
   2a. If "Service Worker Navigation Preload" is not enabled, enable it and then restart Safari.
3. Navigate to https://jlwagner.net/
4. Click on the "contact" link to go to a page where the service worker will control it. There should be two instances of the site header and footer.
5. Navigate to https://jlwagner.net/request-headers.php to view response headers.
6. There should be a list item consisting of "HTTP_SERVICE_WORKER_NAVIGATION_PRELOAD: true", but it will not appear as the header is not being sent.
7. Open a recent version of Chrome, and repeat steps 1-4. Note that there is only one header and one footer.
8. Navigate to https://jlwagner.net/request-headers.php to view response headers.
9. Note that a list item consisting of "HTTP_SERVICE_WORKER_NAVIGATION_PRELOAD: true" is present.

Expected results:

The Service-Worker-Navigation-Preload header is not being sent when Navigation Preload is enabled.

Actual results:

The Service-Worker-Navigation-Preload header should be sent when Navigation Preload is enabled.

Build Date & Hardware:
Safari Version 15.4 (17613.1.17.1.6) on macOS 12.3 (Intel)

Additional information:
Web Platform Test for the header shows a failure for Safari Technical Preview: https://wpt.fyi/results/service-workers/service-worker/navigation-preload/request-headers.https.html?label=experimental&label=master&aligned

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220330/95c690b5/attachment.htm>


More information about the webkit-unassigned mailing list