Bug 182852 - Feature: Navigation Preload API for Service Worker
Summary: Feature: Navigation Preload API for Service Worker
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-15 17:03 PST by Kenji Baheux
Modified: 2020-10-21 06:55 PDT (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.