ampproject / ampproject/amp-toolbox

Preload render-delaying extensions

Open
#873 2 comments 0 reactions 0 assignees View on GitHub
enhancement toolbox-optimizer
Dominant language
HTML
Stars
459
Forks
242
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Research direction

Read packages/optimizer/lib/transformers/RewriteAmpUrls.js around the linked lines, then compare its preload handling with item 3 of the linked Optimize your hosted AMP pages guide. Verify whether amp-experiment, amp-story, and amp-dynamic-css-classes are included when present, and use the guide's required preload behavior as the completion check.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance, web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.