File tree 1 file changed +11
-0
lines changed
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
66
66
server responded with both the HTML page and the CSS file when the browser only
67
67
requested the HTML page.
68
68
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
+
69
79
.. tip ::
70
80
71
81
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
163
173
.. _`Resource Hints` : https://www.w3.org/TR/resource-hints/
164
174
.. _`Docker installer and runtime for Symfony` : https://github.com/dunglas/symfony-docker
165
175
.. _`preload` : https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content
176
+ .. _`the Priority Hints specification` : https://wicg.github.io/priority-hints/
166
177
.. _`the Preload specification` : https://www.w3.org/TR/preload/#server-push-(http/2)
167
178
.. _`Cloudflare` : https://blog.cloudflare.com/announcing-support-for-http-2-server-push-2/
168
179
.. _`Fastly` : https://docs.fastly.com/guides/performance-tuning/http2-server-push
You can’t perform that action at this time.
0 commit comments