HTTP is insecure. HTTPS over TLS.
HTTP2 is a better performing protocol.
Traditionally everything was over HTTP, but we've discovered that it's a huge security problem.
Moving everything to HTTPS is a slow process that already started.
What's a Web page?
HTML + subresources
Resource types
CSS
JS
Images
Fonts
Images?
There are content images and background images.
Also, there are many supported file formats: PNG, GIF JPG. Then browser specific image types: WebP, JPEGXR, JP2K
!!!! end of first hour !!!!
Web page loading
DNS, then TCP, (then TLS), then HTML is downloaded
Then the browser discovers the rest of the resources in the page and start to download them.
TCP connections
Historically with HTTP1.0 4 connections were reused and closed after each resource.
HTTP1.1 introduced connection keep alive (sort of).
Limited to 2 connections per host
Latency killed performance
What did we do?
Anyone has ideas how we traditionally tackled that connection number limitation?
What were the problems with that?
Sharding has its costs
Also - extra congestion!
How a resource is downloaded?
HTML parsing
HTML is not XML. Parsing involves many subtle rules.
There were attempts to converge the two (XHTML). Failed miserably.
Show the DOM in the inspector.
Web page rendering
CSS zen garden. Show what CSS means
Resource loading
parser loads resource upon element creation or addition to the DOM. CSSOM waits for style calc until resources are
loaded.