November 5, 2018 Javier Eguiluz

The WebLink component introduced in Symfony 3.3 provides tools to manage the Link HTTP header needed for Web Linking when using HTTP/2 Server Push as well as Resource Hints. In practice, it can improve the performance of your web apps dramatically.

In order to simplify its usage, in Symfony 4.2 we've added a new addLink() shortcut to AbstractController . For example, this is how you can preload a CSS file (to send it before the browser requests it):