NetS13nServiceWorker: NavPreload request needs to hook throttles |
|||||
Issue descriptionCurrently NetS13nSW code sends a NavPreload request using the Network Service's loader factory, but this'd probably need to hook up the throttles. Non-NS but S13nSW-enabled code path also would need to do something similar to what CertFetcher did? (The legacy code path goes through RDHI, which has necessary throttles)
,
Aug 13
I'm not sure about this. It looks like the throttles want to do processing before the request goes to network. I think this is at least causing issue 873061 , and possibly others. E.g., GoogleUrlLoaderThrottle is adding headers to YouTube requests for "restrictions", or SafeSearch query parameters to Google Search. It seems nav preload would bypass these since the only request that goes to network is nav preload.
,
Aug 13
,
Aug 13
Talked offline with Kinuko: we think we need to add throttling to navigation preload in the s13nsw/networkservice path similar to SignedExchangeCertFetcher. As another issue, it looks like MIME sniffing also doesn't get applied to the nav preload response which might be needed. Filed issue 873558.
,
Aug 13
,
Aug 16
After looking a bit more, we probably don't want to apply throttles to the nav preload request, because they can mutate the request and it's important for nav preload to be the same request as the fetch event. Instead, throttling should apply before SW interception, so nav preload can use the post-throttled request. I'm working on that at issue 873575 . I'll open a new issue for MIME sniffing. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kinuko@chromium.org
, Mar 26 2018