amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Ask the viewer for the replaceUrl instead of getting it from the init parameters

Open ericfs opened this issue 9 years ago • 7 comments

replaceUrl is currently read from the init parameters passed from the viewer: https://github.com/ampproject/amphtml/blob/2f7a6d10aab4c7e6d964bcac5994c9a72ec5b62c/src/service/viewer-impl.js#L375

The runtime should instead send the viewer a message to get the replaceUrl.

tracked internally: b/66926951

ericfs avatar Sep 26 '17 14:09 ericfs

/cc @cramforce @zhouyx

ericfs avatar Sep 26 '17 22:09 ericfs

CC @jasti

cramforce avatar Sep 27 '17 00:09 cramforce

Since this is tagged as "Analytics", can anyone help me understand the Analytics impact?

rudygalfi avatar Oct 02 '17 15:10 rudygalfi

It's to ensure that the replaceUrl is correctly generated when there are cache redirects. Full details in b/66926951

ericfs avatar Oct 02 '17 16:10 ericfs

Talked offline. Runtime and Viewer message should looks like message getReplaceUrl, no payload response ?string

zhouyx avatar Oct 03 '17 17:10 zhouyx

Any updates on this?

rudygalfi avatar Oct 09 '17 17:10 rudygalfi

Will start working on the issue this week : )

zhouyx avatar Oct 09 '17 17:10 zhouyx