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

Please update the AMP Cache URL Format doc #3851

Closed
Gregable opened this issue Apr 21, 2020 · 2 comments
Closed

Please update the AMP Cache URL Format doc #3851

Gregable opened this issue Apr 21, 2020 · 2 comments
Assignees

Comments

@Gregable
Copy link
Member

📖 Missing or Out-of-Date Documentation

Problem

The AMP Cache Origin algorithm is changing. The changes have largely been implemented, so it seems safe to go ahead and change the wording of the documentation.

Background here.

Location

https://amp.dev/documentation/guides-and-tutorials/learn/amp-caches-and-cors/amp-cache-urls/

Content type

Guides & Tutorials

Information architecture (optional)

Modify the "Basic Algorithm" section to add a new step 4 between current steps 3 and 4:

  1. If the output of step 3 has a "-" (hyphen) at both positions 3 and 4, then to the output of step 3, add a prefix of "0-" and add a suffix of "-0". See [#26205](https://github.com/I2I: Change AMP Cache Origins amphtml#26205) for background.

Modify the last example in the the "basic algorithm" examples to have a domain prefix column value of 0-en--us-example-com-0.

Replace the section "The reasons for a domain prefix not being a valid DNS label include:", including the list below that section with the sentence.

"A domain prefix is not a valid DNS label if it is longer than 63 characters".

Modify the "Amp Cache Origin to Publisher Domain" section to add a new step 2 to the ordered list algorithm between current steps 1 and 2:

  1. If the domain prefix starts with "0-" and ends with "-0", strip both the "0-" prefix and the "-0" suffix.

Change the new steps 3 and 4 (previously 2 and 3) to correctly reference the previous steps. In other words replace: "output by Step 1" with "output by Step 2" and "result of Step 2" with "result of Step 3". Same for the sentence below the algorithm.

@Gregable
Copy link
Member Author

@CrystalOnScript let me know if you need any clarifications. Thanks!

@CrystalOnScript
Copy link
Collaborator

Thanks for taking the time to write this out @Gregable! I've sent up a PR with the requested fixes, let me know if it looks good!

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

No branches or pull requests

3 participants