Ask the viewer for the replaceUrl instead of getting it from the init parameters
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
/cc @cramforce @zhouyx
CC @jasti
Since this is tagged as "Analytics", can anyone help me understand the Analytics impact?
It's to ensure that the replaceUrl is correctly generated when there are cache redirects. Full details in b/66926951
Talked offline. Runtime and Viewer message should looks like
message getReplaceUrl, no payload
response ?string
Any updates on this?
Will start working on the issue this week : )