Skip to content

Commit 476bb59

Browse files
committed
[WebLink] Minor reword
1 parent b3ed2cb commit 476bb59

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

web_link.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ Imagine that your application includes a web page like this:
5050
</body>
5151
</html>
5252

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:
6161

6262
.. code-block:: html+twig
6363

0 commit comments

Comments
 (0)