Live data from Hacker News

HTTP/2 Server Push on Netlify

netlify.com

1–10 of 24 posts

Re: HTTP/2 Server Push on Netlify

#2
> It’s important to understand that HTTP/2 requires secure connectivity. Only websites with HTTPS enabled can take advantage of HTTP/2 and its performance optimizations, like server push and header compression.

Pedantically, this is not correct. HTTP/2 does not mandate any encryption. But, all the browser vendors only support HTTP/2 with TLS. https://http2.github.io/faq/#does-http2-require-encryption

Re: HTTP/2 Server Push on Netlify

#3
post #2

> It’s important to understand that HTTP/2 requires secure connectivity. Only websites with HTTPS enabled can take advantage of HTTP/2 and its performance optimizations, like server push and header compression. Pedantically, this is not correct. HTTP/2 does not mandate any encryption. But, all the browser vendors only support HTTP/2 with TLS. https://http2.github.io/faq/#does-http2-require-encryption

If you assume the second sentence explains the first, then this is correct - only websites (i.e something designed to be consumed by browsers) with HTTPS can take advantage of HTTP/2.

Re: HTTP/2 Server Push on Netlify

#4
How do people go about sending Link headers / configuring server push for resources with a changing hash in their filenames?

For example if you have your app.ab9a9a09fe9.js file, but then the next deploy you have your app.ba293dcde.js file... can you just set the resource to app.*.js somehow?

Re: HTTP/2 Server Push on Netlify

#6
post #4

How do people go about sending Link headers / configuring server push for resources with a changing hash in their filenames? For example if you have your app.ab9a9a09fe9.js file, but then the next deploy you have your app.ba293dcde.js file... can you just set the resource to app.*.js somehow?

If you can write a tag that references app.ab9a9a09fe9.js, presumably you can write a HTTP header that references that same file, no?

Re: HTTP/2 Server Push on Netlify

#7
post #2

> It’s important to understand that HTTP/2 requires secure connectivity. Only websites with HTTPS enabled can take advantage of HTTP/2 and its performance optimizations, like server push and header compression. Pedantically, this is not correct. HTTP/2 does not mandate any encryption. But, all the browser vendors only support HTTP/2 with TLS. https://http2.github.io/faq/#does-http2-require-encryption

If you assume the second sentence explains the first, then this is correct - only websites (i.e something designed to be consumed by browsers) with HTTPS can take advantage of HTTP/2.

This is true, but no mandate on encryption in the HTTP/2 standard was an deliberate decision, one of the very few differences between HTTP/2 and SPDY. But yes, practically, you can't use HTTP/2 without encryption nowadays.

Re: HTTP/2 Server Push on Netlify

#8
post #4

How do people go about sending Link headers / configuring server push for resources with a changing hash in their filenames? For example if you have your app.ab9a9a09fe9.js file, but then the next deploy you have your app.ba293dcde.js file... can you just set the resource to app.*.js somehow?

You can make it part of your build process to generate a file with the headers needed, and during deploy it gets copied and/or configures the web server/platform you're running on.

Re: HTTP/2 Server Push on Netlify

#10
post #6
post #4

How do people go about sending Link headers / configuring server push for resources with a changing hash in their filenames? For example if you have your app.ab9a9a09fe9.js file, but then the next deploy you have your app.ba293dcde.js file... can you just set the resource to app.*.js somehow?

If you can write a tag that references app.ab9a9a09fe9.js, presumably you can write a HTTP header that references that same file, no?

What about a static website served through nginx, for example?
Post reply on HN