From d9b88d7fc890587a2c545a9e69a2f01a975f628c Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Thu, 15 Aug 2019 13:43:23 +0200 Subject: [PATCH] Add a note for preload asset --- web_link.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web_link.rst b/web_link.rst index 4052d753cad..62e0082d5fa 100644 --- a/web_link.rst +++ b/web_link.rst @@ -66,6 +66,17 @@ If you reload the page, the perceived performance will improve because the server responded with both the HTML page and the CSS file when the browser only requested the HTML page. +.. note:: + + You can preload an asset by wrapping it with the ``preload()`` function + + .. code-block:: html+twig + + + {# ... #} + + + Additionally, according to `the Priority Hints specification`_, you can signal the priority of the resource to download using the ``importance`` attribute: