Skip to content
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

Merged
merged 2 commits into from Oct 17, 2016

Conversation

jridgewell
Copy link
Contributor

@jridgewell jridgewell commented Oct 8, 2016

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, not v2), so it'll look like we've been served v2 scripts but then requested the v1 <amp-ad>.

@@ -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`;
Copy link
Member

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.

Copy link
Member

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:

https://cdn.ampproject.org/alp.js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Copy link
Member

@cramforce cramforce left a 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`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@jridgewell jridgewell merged commit 1472d9c into ampproject:master Oct 17, 2016
@jridgewell jridgewell deleted the amp-rtv-version-script-path branch October 17, 2016 21:25
samiamorwas pushed a commit to samiamorwas/amphtml that referenced this pull request Oct 18, 2016
…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)
  ...
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
* Do not use AMP Version as RTV Versions

Fixes ampproject#5471.

* Fix tests
Lith pushed a commit to Lith/amphtml that referenced this pull request Dec 22, 2016
* Do not use AMP Version as RTV Versions

Fixes ampproject#5471.

* Fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants