jquery / codeorigin.jquery.com

jQuery CDN
https://releases.jquery.com
Other
57 stars 602 forks source link

Offer HTTP/2 #47

Closed txtsd closed 4 years ago

txtsd commented 5 years ago

Resources from the jquery CDN are only loaded over HTTP/1.1

txtsd commented 5 years ago

On nginx all you have to do is add http2 to the listen directive.

Krinkle commented 4 years ago

The Nginx server we operate is only the origin server for the frontend layer by StackPath CDN.

I've confirmed via cURL that indeed our CDN currently does not offer HTTP/2 to clients that support it.

$ curl -v -I --http2 'https://code.jquery.com/jquery-3.4.1.js'
*   Trying 2001:4de0:ac19::1:b:3b...
* TCP_NODELAY set
* Connected to code.jquery.com (2001:4de0:ac19::1:b:3b) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
[…]
HEAD /jquery-3.4.1.js HTTP/1.1
Host: code.jquery.com
User-Agent: curl/7.64.1
Accept: */*

HTTP/1.1 200 OK

Compared to Wikipedia, for example:

 $ curl -v -I --http2 'https://www.wikipedia.org/'
*   Trying 2620:0:862:ed1a::1...
* TCP_NODELAY set
* Connected to www.wikipedia.org (2620:0:862:ed1a::1) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
[…]
HEAD / HTTP/2
Host: www.wikipedia.org
User-Agent: curl/7.64.1
Accept: */*

HTTP/2 200 

I've filed an internal infrastructure ticket (https://github.com/jquery/infrastructure/issues/550) to ask whether they can enable this for us there. I've confirmed that it is indeed still not enabled.

Krinkle commented 4 years ago

This is now done.

$  curl -v -I --http2 'https://code.jquery.com/jquery-3.4.1.js'
…
* Connected to code.jquery.com (2001:4de0:ac19::1:b:3b) port 443 (#0)
…
* Using HTTP2, server supports multi-use
…
> HEAD /jquery-3.4.1.js HTTP/2
…
HTTP/2 200
…
x-hw: 1595217238.dop154.ny3.t,1595217238.cds040.ny3.hn,1595217238.cds048.ny3.c
txtsd commented 4 years ago

A year and a half later, but thank you!