HTTP/2 Server Push: Difference between revisions

Content deleted Content added
Osmarks (talk | contribs)
replace examples etc. with short summary of protocol
remove hat notes (issues seem addressed since the given dates)
 
(9 intermediate revisions by 9 users not shown)
Line 1:
{{Short description |WebOutdated web optimization protocol}}
{{use dmy dates|date=April 2022|cs1-dates=y}}
{{Multiple issues|
{{more citations needed |date=May 2016}}
{{tone |date=September 2017}}
}}
 
'''HTTP/2 Server Push''' is an optional<ref>{{Cite journal |date=May 2015 |title=Hypertext Transfer Protocol Version 2 (HTTP/2) |doi=10.17487/RFC7540 |url=https://www.rfc-editor.org/rfc/rfc7540 |quote=A client can request that server push be disabled|last1=Belshe |first1=M. |last2=Peon |first2=R. |last3=Thomson |first3=M. |editor-first1=M |editor-last1=Thomson |doi-access=free }}</ref> feature of the [[HTTP/2]] and [[HTTP/3]] [[Communication protocol|network protocols]] that allows [[Server-side|servers]] to send resources to a [[Client–server model|client]] before the client requests them. Server Push is a performance technique aimed at reducing latency by sending resources to a client preemptively before it knows they will be needed.<ref>{{Cite web |last=Staff |first=Ars |date=2015-02-18 |title=HTTP/2 finished, coming to browsers within weeks |url=https://arstechnica.com/information-technology/2015/02/http2-finished-coming-to-browsers-within-weeks/ |access-date=2023-01-12 |website=Ars Technica |language=en-us}}</ref> In practice, Server Push frequently results in wasted bandwidth because the server rarely knows which resources are already loaded by the client and transmits the same resource multiple times, resulting in slowdowns if the resources being pushed compete for bandwidth with resources whichthat were actually requested.<ref name=":0">{{Cite web |date=2020-11-11 |title=Intent to Remove: HTTP/2 and gQUIC server push |url=https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY/m/vOWBKZGoAQAJ?pli=1 |url-status=live |archive-url=https://web.archive.org/web/20211128080039/https://groups.google.com/a/chromium.org/g/blink-dev/c/K3rYLvmQUBY/m/vOWBKZGoAQAJ?pli=1 |archive-date=2021-11-28 |access-date=2022-04-12 |website=[[Google Groups]] |language=en}}</ref>
 
HTTP/2 Server Push is not a notification mechanism from server to client. Instead, pushed resources are used by the client when it may have otherwise produced a request to get the resource anyway.<ref>{{Cite web |title=HTTP/2 server configurations |url=https://http2.co/http2-with-apache/ |url-status=live |archive-url=https://web.archive.org/web/20220327085843/https://http2.co/http2-with-apache/ |archive-date=2022-03-27 |access-date=2019-03-30 |website=HTTP/2 Space |language=en-US}}</ref><ref>{{cite IETF |title=Hypertext Transfer Protocol Version 2 (HTTP/2) |rfc=7540 |section=8.2 |sectionname=Server Push |page=60 |date=May 2015 |publisher=[[Internet Engineering Task Force]] |access-date=2015-05-06 |language=en-US |archive-url=https://web.archive.org/web/20220404104429/https://datatracker.ietf.org/doc/html/rfc7540 |archive-date=2022-04-04 |url-status=live}}</ref>
 
== History ==
On May 14, 2015, HTTP/2 was standardized by {{IETF RFC|7540}}, ratified as a Proposed Standard. The document includes section 8.2 entitled "Server Push" which introduced the concept to the protocol as an optional extension. [[Google Chrome]] 40 became the first browser supporting the final standardized HTTP/2 version, including the optional Server Push.<ref>{{Cite web |last= |first= |date=2015-02-10 |title=Google announces SPDY's coming demise as HTTP/2 approaches |url=https://arstechnica.com/information-technology/2015/02/google-announces-spdys-coming-demise-as-http2-approaches/ |access-date=2023-07-30 |website=Ars Technica |language=en-us}}</ref>
 
In February 2018, [[Nginx]] 1.13.9 was released with optional support for HTTP/2 Server Push.<ref name=":1" />
 
In OctoberNovember 20222020, [[Google]] announced its intent to remove Server Push from Google Chrome citing the poor performanceimplementation of the extension in practice, lack of useHTTP/2 and better[[QUIC|gQUIC]] alternatives.(which Chromelater 106evolved becameinto the first release disabling Server Push by defaultHTTP/3).<ref name=":2">{{Cite web |last=Lassey |first=Brad |date=20222020-0811-1812 |title=RemovingIntent to Remove: HTTP/2 Serverand PushgQUIC fromserver Chromepush |url=https://developergroups.chromegoogle.com/bloga/removingchromium.org/g/blink-pushdev/c/K3rYLvmQUBY/m/vOWBKZGoAQAJ |access-date=2023-0711-3020 |website=ChromeBlink Developersmailing |language=enlist}}</ref>
 
In October 2022, Google announced their intent to remove Server Push from Google Chrome, citing the poor performance of the extension in practice, lack of use and better alternatives. Chrome 106 became the first release disabling Server Push by default.<ref name=":2">{{Cite web |date=2022-08-18 |title=Removing HTTP/2 Server Push from Chrome |url=https://developer.chrome.com/blog/removing-push/ |access-date=2023-07-30 |website=Chrome Developers |language=en}}</ref>
 
On October 29, 2024, [[Mozilla Corporation|Mozilla]] released [[Firefox]] 132, which removed HTTP/2 Server Push support due to "compatibility issues with various sites".<ref>{{Cite web |title=Firefox 132.0, See All New Features, Updates and Fixes |url=https://www.mozilla.org/en-US/firefox/132.0/releasenotes/ |access-date=2024-10-29 |website=Mozilla |language=en}}</ref>
 
== Protocol ==
 
Unlike [[HTTP|HTTP/1.1]], HTTP/2 can multiplex multiple streams on one TCP connection. Server Push allows the server to open new streams by sending PUSH_PROMISE frames, in order to send the client resources it expects will be needed. A PUSH_PROMISE frame is similar to a GET request, but sent by the server. A client may choose to reject the push by sending an RST_STREAM frame, for example, if it already has the resource cached; if it does not, it will store the pushed data in a cache associated with the connection which will be consulted before a request is sent down that connection. Clients can also request that servers not send server pushes using a SETTINGS frame. The specification itself does not specify how servers choose what to push: a webserverweb server might send pushes to clients only on their first visit, to avoid redundantly sending cached resources.<ref>{{Cite web |date=2022-03-17 |title=HTTP/1.1 vs HTTP/2: What's the Difference? |url=https://www.digitalocean.com/community/tutorials/http-1-1-vs-http-2-what-s-the-difference |access-date=2023-11-20 |website=DigitalOcean |language=en}}</ref><ref>{{Cite web |date=2018-02-20 |title=Introducing HTTP/2 Server Push with NGINX 1.13.9 |url=https://www.nginx.com/blog/nginx-1-13-9-http2-server-push/ |access-date=2023-11-20 |website=Nginx |language=en}}</ref><ref>{{Cite web |date=2016-04-28 |title=Announcing Support for HTTP/2 Server Push |url=https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/ |access-date=2023-11-20}}</ref>
 
== Implementations ==
Line 41:
|[[Google Chrome]]
|Client
|40 (May 2015)
|?
|106 (September 2022)<ref name=":0" /><ref name=":2" /><ref>{{Cite web |date=2022-10-31 |title=Remove HTTP/2 push |url=https://chromestatus.com/feature/6302414934114304 |access-date=2023-07-12 |website=chromestatus.com}}</ref>
|-
Line 47:
|Client
|?
|131.0 Beta 9<ref>{{Cite web |title=Intent to unship: HTTP/2 Push |url=https://groups.google.com/a/mozilla.org/g/dev-platform/c/vU9hJg343U8/m/4cZsHz7TAQAJ |access-date=2024-09-06 |website=groups.google.com}}</ref><ref>{{Cite web |title=Firefox Beta 132.0beta, See All New Features, Updates and Fixes |url=https://www.mozilla.org/en-US/firefox/132.0beta/releasenotes/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog |access-date=2024-10-01 |website=Mozilla |language=en}}</ref>
|Still supported{{Citation needed|date=July 2023}}
|}