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

ALP: add support for #replaceUrl for cache hit improvement #9044

Closed
dvoytenko opened this issue Apr 28, 2017 · 0 comments
Closed

ALP: add support for #replaceUrl for cache hit improvement #9044

dvoytenko opened this issue Apr 28, 2017 · 0 comments

Comments

@dvoytenko
Copy link
Contributor

ALPs have many client-resolvable query parameters which greatly reduce cache-hit by multiplying cache keys. E.g. https://host/alp?adpos=X will multiply on the possible space of adpos query parameter, even though it's never used by the page itself.

The proposal is to use https://host/alp as the cache URL/key and replace it when AMP runtime starts up to https://host/alp?adpos=X. The replacing URL will be specified via viewer param as #replaceUrl=....

Some important notes:

  1. Replacement should be done, ideally, very early on and definitely before installDocumentStateService is called.
  2. The replacement URL must match the original URLs origin and source origin
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

2 participants