ampproject / ampproject/amphtml

Prefetch JSON support for faster amp-list rendering

Open
#38,586 1 comment 0 reactions 0 assignees View on GitHub
P3: When Possible Type: Feature Request WG: caching
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

Enable an inline html parameter that can opt-in/opt-out of utilizing prefetch on the amp-list component. Implement a prefetch function that will retrieve the data and then cache it or store it in local-storage. Then allow the amp-list component to render data from the storage point. Not sure how or where prefetched data will be stored but will update thread when a proper solution is found.

### Alternatives Considered

An alternative but long shot is to store fetched data within an amp-state; Then render from there. But this could cause a not so easy implementation process for developers.

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the amp-list component entry point and review the issue's proposed inline HTML parameter, prefetch behavior, and possible cache or local-storage options. Done means the component can opt in or out of prefetching and render retrieved data from the chosen storage point, with the storage approach resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.