The best practices of HTTP1 are harmful in a HTTP2 world
mattwilcox.net
The best practices of HTTP1 are harmful in a HTTP2 world
1–10 of 62 posts
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#2Edit: answering my own question: http://stackoverflow.com/a/807161
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#31) How can they coexist on the same server? I googled a little but maybe with the wrong keywords. I found this but it's pretty shallow on details http://nginx.com/blog/how-nginx-plans-to-support-http2/
2) I still want to serve HTTP1 optimized content to HTTP1 clients. I hope web servers are going to let us serve different content based on protocol version. Maybe the application server needs to know about it too.
Anybody here with first hand experience?
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#4Let's say I have a site that uses best practices for HTTP/1.1, and loads within 2 seconds without caching. It sounds like the article saying that switching to HTTP/2 will make my site slower.
What I've read so far in other places is that the site should by default (no modifications) be faster, it is just wont be optimized until I remove all my hacks for HTTP/1.1
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#5I'm having a hard time understanding the argument. Let's say I have a site that uses best practices for HTTP/1.1, and loads within 2 seconds without caching. It sounds like the article saying that switching to HTTP/2 will make my site slower. What I've read so far in other places is that the site should by default (no modifications) be faster, it is just wont be optimized until I remove all my hacks for HTTP/1.1
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#6I expect to have to support HTTP for a long time on my sites but it would be nice to start using HTTP2 with browsers that can handle it. I can see two problems: 1) How can they coexist on the same server? I googled a little but maybe with the wrong keywords. I found this but it's pretty shallow on details http://nginx.com/blog/how-nginx-plans-to-support-http2/ 2) I still want to serve HTTP1 optimized content to HTTP1…
At the protocol level, this is covered by section 3 of the HTTP/2 spec: http://http2.github.io/http2-spec/index.html#starting
For https:// URIs, the client and server agree on which version to use as part of the TLS negotiation. For http:// URIs, major browsers won't be using HTTP/2 at all, but if they did, the spec defines a mechanism similar to websockets: the client makes an HTTP/1.1 request with a special Upgrade header, and the server responds by changing protocols in a coordinated way.
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#7I'm having a hard time understanding the argument. Let's say I have a site that uses best practices for HTTP/1.1, and loads within 2 seconds without caching. It sounds like the article saying that switching to HTTP/2 will make my site slower. What I've read so far in other places is that the site should by default (no modifications) be faster, it is just wont be optimized until I remove all my hacks for HTTP/1.1
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#8- A sprite tends to have fewer bytes than separate images, because of image format overhead and better compression when combining similar things.
- The same may be true for zipped CSS/JS.
- What about CSS/JS/image parsing overhead?
- Even though HTTP2's request overhead is substantially less than HTTP1, fewer HTTP requests shouldn't make your site slower.
So the best practices will be outdated. Harmful? Not so sure.
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#9I'm having a hard time understanding the argument. Let's say I have a site that uses best practices for HTTP/1.1, and loads within 2 seconds without caching. It sounds like the article saying that switching to HTTP/2 will make my site slower. What I've read so far in other places is that the site should by default (no modifications) be faster, it is just wont be optimized until I remove all my hacks for HTTP/1.1
Run slower than the same site with the HTTP 1.1 'hacks' removed
Run faster than the same site serving via HTTP 1.1.
In most cases.
Re: The best practices of HTTP1 are harmful in a HTTP2 world
#10HTTP1 supports pipelining requests.
> HTTP2 also uses compression, unlike HTTP1, and so the size of the request is significantly smaller - and thus faster.
'significantly'? How much is that?
> HTTP2 multiplexes; it can send and receive multiple things at the same time over one connection.
If that one connection stalls, multiple things won't be transferred.
Plus it introduces new protocol overhead.