Open
Description
In my opinion, this page is confusing: https://symfony.com/doc/current/web_link.html
There are repeated explanations about asset preloading and they seem to contradict each other:
In my opinion, this page is confusing: https://symfony.com/doc/current/web_link.html
There are repeated explanations about asset preloading and they seem to contradict each other:
Activity
javiereguiluz commentedon Jan 13, 2025
What we need to clarify here is:
94noni commentedon Jan 15, 2025
@javiereguiluz i’ve experience this as well recently on a project when reading doc and blog and code
@smnandre friendly ping, this relates to our discussion recently on symfony/symfony#59392
To me there is room for doc update indeed, perhaps as well with some graph?
javiereguiluz commentedon Jan 17, 2025
Let's ping our friend @dunglas to see if he can explain this to us and then we can update the docs based on those comments. Thanks.
smnandre commentedon Jan 18, 2025
Can already answer some of your comments here:
Regarding the contradiction, we may use a better example in the second one, for instance preloading a webfont that will be used in the page but declared in a CSS file.
First comment can be removed i think. It was certainely written on good intention: avoiding someone thinking just using the preload tag will load it's CSS. But in the end i agree it may create more doubts than help.
We can totally write all the answers for the questions you asked, but I also think we should be transparent on the expected impacts, and maybe list the other things to do to achieve better performance (as i'm afraid not everyone is already aware of the first things to check... and would not want people to believe they have to handle this in priority when assets size, lazy loading, cache, should (maybe?) be done before any header optimization)