[HTTP2] HTTP1 probs and HTTP2 saves

Source: Internet
Author: User

1. HOL (HEADS of line BLOCKING)

Too many requests in the header tag. Broswer can allow 6 reuqest to be handled simultaneously. and each request and its response make up a round trip. As we all know round trips is bad, it cost time and force use waiting so we want to reduce the round trip as much as Possil Be.

2. Uncompressed Headers

Broswer can help and compressed the data when send to the server, but the broswer doesn ' t compress the HEAD. But usually HEAD is always the same.

And those HEAD takes, Bytes. If request then takes 80kb.

But HTTP1 doesn ' t help with that.

3. Security

HTTP + TLS = HTTPS. HTTP2 require HTTPS by default. So it also need TLS by Defualt.

---------------

HTTP2

1. By multiplex:

A system or signal involving simultaneous transmission of several messages along a single channel of communication

Combine multi sinlges into one sinlge. With HTTP2, now we have one connection instead of six.

HTTP2 Devid Connection in HTTP1 to multi stream and share one Connection. If One stream is blocked, another stream would take over which'll be good to take fully used of Idel time.

2. HEAD would be compressed. Now HEAD never been sent twice since they is the same, instead, would just send the reference.

If we load the same website on one HTTP1 server and another HTTP2, the difference:

The tab down below are HTTP2 server, as we can see, because of the compression and HEAD and stream solution. HTTP2 is much faster than HTTP1 server.

Beause HTTP2 Check the HEAD (caching) more efficient, it turns off necessary to bunld your CSS and js files, because y ou change on single JS file, it'll force the broswer to redownload the whole bundle.js. But Minifiy is still good.

[HTTP2] HTTP1 probs and HTTP2 saves

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.