Commit 476bb59 1 parent b3ed2cb commit 476bb59 Copy full SHA for 476bb59
File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ Imagine that your application includes a web page like this:
50
50
</body >
51
51
</html >
52
52
53
- Following the traditional HTTP workflow, when this page is served browsers will
54
- make one request for the HTML page and another request for the linked CSS file.
55
- However, thanks to HTTP/2 your application can start sending the CSS file
56
- contents even before browsers request them.
57
-
58
- You can update the template to use the ``preload() `` Twig function provided by
59
- WebLink. The `"as" attribute `_ is mandatory because browsers need it to apply
60
- correct prioritization and the content security policy:
53
+ In a traditional HTTP workflow, when this page is loaded, browsers make one
54
+ request for the HTML document and another for the linked CSS file. However,
55
+ with HTTP/2, your application can send the CSS file's contents to the browser
56
+ before it requests them.
57
+
58
+ To achieve this, update your template to use the ``preload() `` Twig function
59
+ provided by WebLink. Note that the `"as" attribute `_ is required, as browsers use
60
+ it to prioritize resources correctly and comply with the content security policy:
61
61
62
62
.. code-block :: html+twig
63
63
You can’t perform that action at this time.
0 commit comments