Bug 182852

Summary: Feature: Navigation Preload API for Service Worker
Product: WebKit Reporter: Kenji Baheux <kenjibaheux>
Component: Service WorkersAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: adieulot, ben, cedric, mjs, nicolas, tomac, webkit-bug-importer, webkit, youennf
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 233523, 233698    
Bug Blocks:    

Description Kenji Baheux 2018-02-15 17:03:16 PST
Navigation Preload is an important Service Worker API allowing to offset the startup cost of Service Worker by issuing a parallel request for the main resource.
Typically, we've observed 300~400ms (1 RTT) wins on mobile with key partners (I'll try to get them to chime on this bug).

Spec: https://w3c.github.io/ServiceWorker/#service-worker-registration-navigationpreload

 - Available in Chrome 59+

 - Mozilla is supportive, tracking bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1290958)
 - Edge is supportive [1]
 - I believe that Apple was also supportive [1]

[1]: https://github.com/w3c/ServiceWorker/issues/920#issuecomment-236251448
Comment 1 Thomas Steiner 2019-05-29 11:12:28 PDT
Navigation Preload is _one_ of the necessities for the Google Search team to ship a service worker on https://www.google.com/. Latency is a major concern, and Navigation Preload was the biggest win in several of the Chrome team’s experiments. For your consideration. Thanks.
Comment 2 Thomas Steiner 2019-06-20 15:38:31 PDT
The Google Search team have just documented why they need the Navigation Preload API: https://web.dev/google-search-sw/#service-worker-overhead.
Comment 3 Radar WebKit Bug Importer 2019-06-20 17:29:29 PDT
<rdar://problem/51967743>
Comment 4 Ben Kelly 2020-10-20 12:32:03 PDT
Youenn, at the TPAC meeting today you asked that a feature request for service worker be filed.  This bug already exists.  Do you still need a new request to be filed?

Also, what information do you need here?  At the meeting today I believe we discussed a number of large sites depending on this feature.  This lists Google search, Linkedin, Facebook, and other MS properties like Outlook:

https://docs.google.com/document/d/1qX-6w2Ixo7f0NdWv--SQbRWLtvnoKHgjyAQ0DnB6xc8/edit#bookmark=id.9r5gr3pm4c2v
Comment 5 youenn fablet 2020-10-21 06:55:30 PDT
(In reply to Ben Kelly from comment #4)
> Youenn, at the TPAC meeting today you asked that a feature request for
> service worker be filed.  This bug already exists.  Do you still need a new
> request to be filed?

Thanks for following up.
This bug is good enough if all web developers are happy to put public information here.

> Also, what information do you need here?  At the meeting today I believe we
> discussed a number of large sites depending on this feature.  This lists
> Google search, Linkedin, Facebook, and other MS properties like Outlook:
> 
> https://docs.google.com/document/d/1qX-6w2Ixo7f0NdWv--
> SQbRWLtvnoKHgjyAQ0DnB6xc8/edit#bookmark=id.9r5gr3pm4c2v

Knowing that these websites are relying on navigation preload is useful for prioritization.
As discussed during the meeting, it would be really helpful to be able to measure perf benefits on some of those websites while working on further optimisations, including preload manager.
Comment 6 Thomas Steiner 2022-01-20 16:19:15 PST
Seems like this was fixed via https://bugs.webkit.org/show_bug.cgi?id=233755.
Comment 7 youenn fablet 2022-01-20 22:45:59 PST
(In reply to Thomas Steiner from comment #6)
> Seems like this was fixed via https://bugs.webkit.org/show_bug.cgi?id=233755.

Yes, it can be tested on the latest STP 138.
Comment 8 youenn fablet 2022-05-02 07:54:59 PDT
This has now shipped.