<commit_before>---
layout: post
title: "A kick-start into server push"
permalink: /kickstart-into-server-push/
date: 2016-03-17 20:00:00 +0000
author: slemgrim
--- 

I bet you heard about server push in the last few months. 
Every HTTP/2 article mentions it, but do you really know what it's all about?
The intention of this article is to give you a kick-start into the topic.

Why do we need server push?
---

To answer that question we have to look at how HTTP/1.x works. 
The "internet" consists of resources which are linked together. 
Take your standard web-page, it consists of a HTML file, various 
stylesheets, scripts, images and other assets.

```
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="assets/css/app.css" type="text/css">
</head>
<body>
    <script src="assets/js/app.js"></script>
    <script src="assets/js/index.js"></script>
</body>
</html>
```

When we request a website your browser first loads a HTML file, 
looks for all assets inside it, and requests each asset on its own. 
Every asset can then require other assets on its own. Think about background 
images in your stylesheets or scripts loaded with AJAX.<commit_msg>spaaace<commit_after>---
layout: post
title: "A kick-start into server push"
permalink: /kickstart-into-server-push/
date: 2016-03-17 20:00:00 +0000
author: slemgrim
--- 

I bet you heard about server push in the last few months. 
Every HTTP/2 article mentions it, but do you really know what it's all about? 
The intention of this article is to give you a kick-start into the topic.

Why do we need server push?
---

To answer that question we have to look at how HTTP/1.x works. 
The "internet" consists of resources which are linked together. 
Take your standard web-page, it consists of a HTML file, various 
stylesheets, scripts, images and other assets.

```
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="assets/css/app.css" type="text/css">
</head>
<body>
    <script src="assets/js/app.js"></script>
    <script src="assets/js/index.js"></script>
</body>
</html>
```

When we request a website your browser first loads a HTML file, 
looks for all assets inside it, and requests each asset on its own. 
Every asset can then require other assets on its own. Think about background 
images in your stylesheets or scripts loaded with AJAX.
{'fraction_non_alphanumeric': 0.09978494623655915, 'fraction_numerical': 0.017204301075268817, 'mean_word_length': 3.8865546218487395, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3217961', 'n_tokens_mistral': 743, 'n_tokens_neox': 692, 'n_words': 327}