Skip to content

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

@dvoytenko

Description

@dvoytenko

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions