question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[amp-story] When not coming from cache, you should be able to prerender assets without playing the story.

See original GitHub issue

Description

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:open
  • Created 2 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
jridgewellcommented, Mar 1, 2022

We cannot make changes to the privacy features of PRERENDER state. We could make it so that PAUSED state allows buildCallback.

1reaction
samouricommented, Mar 8, 2022

@edoudou + @newmuis: The privacy preserving characteristics of PREVIEW and PRERENDER modes depend on an AMP Optimizer rewriting subresource URLs to point to the cache. For example, redirecting all <amp-img> tag src 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 have prerenderAllowed set to true.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found