File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,16 @@ If you reload the page, the perceived performance will improve because the
6666server responded with both the HTML page and the CSS file when the browser only
6767requested the HTML page.
6868
69+ Additionally, according to `the Priority Hints specification `_, you can signal
70+ the priority of the resource to download using the ``importance `` attribute:
71+
72+ .. code :: twig
73+
74+ <head>
75+ {# ... #}
76+ <link rel="stylesheet" href="{{ preload('/app.css', { importance: 'low' }) }}">
77+ </head>
78+
6979 .. tip ::
7080
7181 Google Chrome provides an interface to debug HTTP/2 connections. Browse
@@ -163,6 +173,7 @@ You can also add links to the HTTP response directly from controllers and servic
163173.. _`Resource Hints` : https://www.w3.org/TR/resource-hints/
164174.. _`Docker installer and runtime for Symfony` : https://github.com/dunglas/symfony-docker
165175.. _`preload` : https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content
176+ .. _`the Priority Hints specification` : https://wicg.github.io/priority-hints/
166177.. _`the Preload specification` : https://www.w3.org/TR/preload/#server-push-(http/2)
167178.. _`Cloudflare` : https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/
168179.. _`Fastly` : https://docs.fastly.com/guides/performance-tuning/http2-server-push
You can’t perform that action at this time.
0 commit comments