ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.88k stars 3.89k forks source link

AMP-to-AMP (A2A) linking #12496

Closed dreamofabear closed 6 years ago

dreamofabear commented 6 years ago

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

Notes:

/cc @lswang1618

lswang1618 commented 6 years ago

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

ithinkihaveacat commented 6 years ago

Does this have the same behavior on and off caches?

morsssss commented 6 years ago

Nice!

dreamofabear commented 6 years ago

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

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

ampprojectbot commented 6 years ago

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

dreamofabear commented 6 years ago

Feedback from design review https://github.com/ampproject/amphtml/issues/12939#issuecomment-362006871:

dreamofabear commented 6 years ago

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 commented 6 years ago

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

westonruter commented 5 years ago

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 https://github.com/ampproject/amp-wp/issues/1389#issuecomment-459126087.