I'm currently planning on adding a "flag" of some sort to the optimized version of an AMP page that was optimized via the PHP implementation of the AMP optimizer. One method would of course be to add a <meta name="generator"> tag to the document. However, it feels wrong to _add_ what is basically "cruft" to the document while optimizing it.
I'd like to find out what the semantic meaning of the transformed attribute is (right now or in the foreseeable future). Right now, the documentation states that the optimizers should use transformed="self;v=1" here, but points out that the Google AMP Cache uses transformed="google;v=1".
I'd like to use this flag to allow RUM to detect the actual implementation in use, by using something like transformed="amptoolboxphp;v=1".
@Gregable or @honeybadgerdontcare
This seems like a reasonable request, are there other values or a schema for this attribute value that is enforced?
@kristoferbaxter It is supposed to be restricted to caches listed at https://cdn.ampproject.org/caches.json and self. This has not been implemented in the validator yet but was planned to be.
The initial optimizations happening by transformers were done by AMP caches. This is why caches self identified via the transformed attribute.
When open sourcing the transformers for other tools it was decided that if a developer is using these on their own they should self identify that they did them, regardless of the tools that were used.
An issue I see with having tools set the value is what should the value be if multiple tools were used. By using the meta tag each tool could self identify.
I'm also not convinced that adding a <meta name=generator> is any more cruft than changing the self value to something else.
This has not been implemented in the validator yet but was planned to be.
Should we make this change sooner rather than later?
An issue I see with having tools set the value is what should the value be if multiple tools were used. By using the meta tag each tool could self identify.
This is an excellent point. Perhaps we should encourage the <meta> tag for this case (and caches should remove it) so multiple parties can cooperate without a AMP Validator schema restriction.
Thanks for the additional context, I'll proceed with a <meta name="generator"> tag then.
This has not been implemented in the validator yet but was planned to be.
Should we make this change sooner rather than later?
Filed #31218 and assigned to me.
An issue I see with having tools set the value is what should the value be if multiple tools were used. By using the meta tag each tool could self identify.
This is an excellent point. Perhaps we should encourage the
<meta>tag for this case (and caches should remove it) so multiple parties can cooperate without a AMP Validator schema restriction.
Caches following our guidelines will remove <meta name=generator> automatically. The Google AMP Cache will remove it.