amp-toolbox icon indicating copy to clipboard operation
amp-toolbox copied to clipboard

Preload render-delaying extensions

Open schlessera opened this issue 3 years ago • 2 comments

Shouldn't the following logic include the render-delaying extensions (amp-experiment, amp-story, amp-dynamic-css-classes) to add as preloads as well?

https://github.com/ampproject/amp-toolbox/blob/bf92d77fd1f53c54519bf8bed2be05b0bca26004/packages/optimizer/lib/transformers/RewriteAmpUrls.js#L174-L176

According to item 3. of the Optimize your hosted AMP pages guide:

If your page includes render-delaying extensions (e.g., amp-experiment, amp-dynamic-css-classes, amp-story), preload those extensions as they're required by the AMP runtime for rendering the page.

schlessera avatar Jul 24 '20 10:07 schlessera

Good point! We should add this!

sebastianbenz avatar Jul 24 '20 10:07 sebastianbenz

👍🏼

Does the AMP Cache currently do this? If no, please file a bug there as well.

cramforce avatar Jul 24 '20 14:07 cramforce