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

AMP-to-AMP (A2A) linking #12496

Closed
2 tasks done
dreamofabear opened this issue Dec 18, 2017 · 9 comments · Fixed by #13300
Closed
2 tasks done

AMP-to-AMP (A2A) linking #12496

dreamofabear opened this issue Dec 18, 2017 · 9 comments · Fixed by #13300

Comments

@dreamofabear
Copy link

dreamofabear commented Dec 18, 2017

Features for publishers to specify navigation from an AMP page to another AMP page when served from CDN:

  • Add per-link opt-in, e.g. <a href="example.com/amp" amp>
  • Add whole page opt-in for all navigation features (links, AMP.navigateTo, AMP-Redirect-To) with new boolean attribute on HTML tag e.g. <html a2a-by-default>

Notes:

  • The viewer already has an a2a capability and page -> viewer message. See navigateTo() in viewer-impl.js
  • Note that this is distinct from the proposed AMP Cache transformation that adds amp-href to normal <a> URLs that it already has a cached AMP page for

/cc @lswang1618

@lswang1618
Copy link

Just confirming, does per-link opt in only include anchor links or is it for all navigation features?

@ithinkihaveacat
Copy link
Contributor

Does this have the same behavior on and off caches?

@morsssss
Copy link
Contributor

Nice!

@dreamofabear
Copy link
Author

@lswang1618 All navigation features eventually, <a> first.

@ithinkihaveacat Good question. Off cache this is a no-op.

@ampprojectbot
Copy link
Member

This is a high priority issue but it hasn't been updated in awhile. @choumx Do you have any updates?

@dreamofabear
Copy link
Author

Feedback from design review #12939 (comment):

  • Use <a rel="amphtml"> instead of new boolean attribute?
  • Don't proliferate "a2a" acronym
  • For now, don't publicize document-level opt-in in case we iterate on the syntax

@dreamofabear
Copy link
Author

dreamofabear commented Feb 5, 2018

New proposal

For links:

<a rel=amphtml href="amp.html">An AMP link</a>

For forms and actions:

<!-- Per-feature opt-in based on `content` attribute. -->
<meta name="amp-to-amp-navigation" content="AMP-Redirect-To; AMP.navigateTo">

/cc @cramforce

@cramforce
Copy link
Member

Looks good as discussed in review. No semiconolon in content.

@westonruter
Copy link
Member

FYI: I've put together an extension that implements A2A linking for sites using the AMP plugin, when that feature is implemented by an AMP viewer. See more at ampproject/amp-wp#1389 (comment).

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

Successfully merging a pull request may close this issue.

8 participants