HTTP/2 Server Push is being deprecated
Closed this issue · 2 comments
Surprised I didn't see this earlier, but HTTP/2 Server Push was removed from Chrome as of version 106.
https://developer.chrome.com/blog/removing-push/
Nebula will need to be updated to remove that functionality and where possible, increase the usage of Early Hints which have been implemented to some extent but could probably be utilized even more.
The same functionality and logic that is used to predict HTTP/2 Server Push could potentially send 103
responses for predicted resources that may be needed– since it also uses response headers.
Am I oversimplifying this, or is the only difference here that I need to add nopush
to the existing headers...?
The Early Hint "Link" header is identical to the http2 server push header except that apparently it just needs nopush
added to it:
header('Link: <' . esc_url(str_replace($this->url_components('basedomain'), '', strtok($src, '#'))) . '>; rel=preload; as=' . $filetype . '; nopush' . $crossorigin, false);
https://www.incoherent.ch/2021/10/18/http-link-header-early-hints-and-server-push.html
I have also removed the condition that requires the service worker to be enabled for Early Hints to be sent– they now send on all navigational (non-background) requests.