Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Minimal AMP support: don't invalidate AMP #1263

@jmarantz

Description

@jmarantz

PageSpeed should never inject JavaScript into AMP pages, as that will invalidate them. I think to determine that we need to look for <html AMP>, although the spec which has a utf-8 lightning bolt character rather than "AMP": <html ⚡>. See https://www.ampproject.org/docs/get_started/about-amp.html . (how does that work when the site is in russian or chinese encoding???)

PageSpeed should optimize src in amp-img tags, which starts with adding some default UrlValuedAttribute settings. See https://www.ampproject.org/docs/reference/amp-img.html . But for the moment, PageSpeed should not transcode amp-img URLs to webp because AMP pages must be served as publicly cacheable without varying on user-agent. So some kind of element equivalent must be employed to allow for UA-dependent img tags.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions