[amp-story] When not coming from cache, you should be able to prerender assets without playing the story.
See original GitHub issueDescription
Right now, the only way to display an asset is to set the visibility state to visible
. However, this play the story. You cannot render the story if you never played it before.
As discussed with @newmuis during the working group, this is to prevent security issues. This prevent tiers services from getting information on the user.
However, this prevent certain worklflow, where a story could be visible but should not play, as it is not the focus of attention.
Developers should have a way to display assets without playing the story, either using an additional visibility, or with an additional state.
Reproduction Steps
On this sandbox, you can try to change the story visibilityState : https://z9ce0.csb.app/
Relevant Logs
No response
Browser(s) Affected
No response
OS(s) Affected
No response
Device(s) Affected
No response
AMP Version Affected
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
I2I: Programmatic control of the amp-story-player · Issue #28416
If no value is passed or if delta equals 0, current page will persist and no action will be taken. Pause current story...
Read more >General tips and best practices - Troubleshooting - Prerender.io
The Prerender.io service fetches your site using the Prerender.io user agent, but it only renders, caches and stores the DOM, it doesn't cache...
Read more >Why AMP Caches exist. The story behind one of the most…
Valid AMP documents behave “cooperatively” during the pre-render stage: Only assets in the first viewport get preloaded, and no third-party ...
Read more >Roadmap - amp.dev
The AMP Project Roadmap ... The ongoing development of AMP is conducted in working groups, each with knowledge or interest in a specific...
Read more >WordPress and AMP - Everything you need to know - XWP
It fetches AMP HTML pages, caches them, and improves page performance automatically. When using the Google AMP Cache, the document, all JS files,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We cannot make changes to the privacy features of
PRERENDER
state. We could make it so thatPAUSED
state allowsbuildCallback
.@edoudou + @newmuis: The privacy preserving characteristics of
PREVIEW
andPRERENDER
modes depend on an AMP Optimizer rewriting subresource URLs to point to the cache. For example, redirecting all<amp-img>
tagsrc
attributes to point to a cache address instead of the original origin address. This concept doesn’t apply off cache.PRERENDER
might work for your use case as long as all the components you care about haveprerenderAllowed
set to true.