New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not use AMP Version as RTV Versions #5474
Do not use AMP Version as RTV Versions #5474
Conversation
80dd5d9
to
6647f57
Compare
@@ -177,8 +177,7 @@ export function warmupStatic(win) { | |||
const linkRel = /*OK*/document.createElement('link'); | |||
linkRel.rel = 'preload'; | |||
linkRel.setAttribute('as', 'script'); | |||
linkRel.href = | |||
`${urls.cdn}/rtv/01$internalRuntimeVersion$/v0.js`; | |||
linkRel.href = `${urls.cdn}/v0.js`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erwinmombay Do we inject the config yet? In any way we should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cramforce is this code part of alp.js? if so then yes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, but lets wait for @erwinmombay to comment.
@@ -177,8 +177,7 @@ export function warmupStatic(win) { | |||
const linkRel = /*OK*/document.createElement('link'); | |||
linkRel.rel = 'preload'; | |||
linkRel.setAttribute('as', 'script'); | |||
linkRel.href = | |||
`${urls.cdn}/rtv/01$internalRuntimeVersion$/v0.js`; | |||
linkRel.href = `${urls.cdn}/v0.js`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
70d82b3
to
17a729f
Compare
…mp_reddit_extension * 'master' of https://github.com/ampproject/amphtml: (63 commits) Position:relative on body (ampproject#5665) Fix for ampproject#5663 (ampproject#5664) Nokta Ad Server is added as an ad type (ampproject#5550) RFC: Separate the load phase of AMP into multiple chunks. (ampproject#5536) Add OWNERS files for A4A. (ampproject#5651) Update DEVELOPING.md Call original event add/remove via interceptor (ampproject#5650) Fix wording on confusing steps to protect against CSRF. (ampproject#5646) Install runtime CSS for all amp tests (ampproject#5642) Implement outgoing link URL replacements. (ampproject#5628) Wait for window to load before installing ServiceWorker. (ampproject#5638) iOS wrapper viewport implementation (ampproject#5629) Do not use AMP Version as RTV Versions (ampproject#5474) Purch Ad Support for Amp-Ads (ampproject#5464) A11Y fix for sticky ad close button. (ampproject#5640) Propagate ARIA attributes to real-elements (ampproject#5590) Ibillboard integration (ampproject#5392) Add some keywords to the NPM description of the validator. (ampproject#5633) PWA: messaging and broadcast (ampproject#5588) Carousel swipe not working well on Android Firefox (ampproject#5626) ...
* Do not use AMP Version as RTV Versions Fixes ampproject#5471. * Fix tests
* Do not use AMP Version as RTV Versions Fixes ampproject#5471. * Fix tests
Closes #5471. #5471 is invalid:
The core issue is that the Cache SW will serve stale-while-revalidate serve last week's (let's call it
v1
) AMP version, but that request will still look like it's requesting the newest AMP version (v2
). The runtime will then dynamically inject the<amp-ad>
's script url using its AMP version (v1
, notv2
), so it'll look like we've been servedv2
scripts but then requested thev1
<amp-ad>
.