From the course: Developing for Web Performance

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Server push

Server push

- [Instructor] One of the big promises of the HTTP 2 protocol was the introduction of server push, allowing the server to literally push assets to the client before those assets were requested. Here's the idea. Traditionally, when a request for a web page goes to the server, the server returns the web page, the HTML document, and the browser starts rendering that HTML document and discovers that, "Hey, I need a CSS file." So it sends another request to the server and the server returns the CSS file. Then the browser discovers, it also needs a JavaScript file and another request is sent to the server and another file is sent back from the server, and all of this takes a long time. Server push allows you to configure the server to say, "If you're requesting this HTML document, "I know you'll also need this CSS file "and this JavaScript file, so I'll send them along as well." And a request for one file results in three…

Contents