Bugfix/NGO-951/Preload Assets#71
Conversation
|
@PeterBooker a few thoughts, sorry if these are crazy ideas 😅 :
Thinking about your 2nd point above, we could hook into |
|
@pierre-dekode Interesting ideas! That would allow us to add the preload, as if something went wrong and we did not have the I would like to explore the |
|
@PeterBooker No, my experience with patterns (outside the ones registered in a theme/template) is limited. I would say that looping through the current |
|
@pierre-dekode That is a great idea, thanks. I will update this PR and make it usable! |
Adds preload for both the JS and the form schema request.
DOES NOT WORK
For the form schema preload to work, the request needs to be made in the the exact same way (request headers, URL, etc). For us the cache busting URL params make this impossible. Looping through the content also does not catch everything which could be included via FSE these days (patterns/etc).
PERFORMANCE ISSUE
We can only add the preload for the form schema by looping through post content in the header. This means that the site needs to loop through the content twice to render the post, which will have a negative performance impact.
IDEAS
I am not sure how to rescue this, but I have a few thoughts.