> It isn't valid technically HTML but custom attributes aren't really that unheard of. Certainly there are no known user agents that have even close to a problem with it
Is it worth having a doctype then? I don't see the logic in adding a description of a validator you then deliberately break.
> As to discovery: You use a link rel=amphtml tag on the canonical and then point the AMP file back via a link rel=canonical
Ah thanks. I'm not a huge fan of having two urls for the same resource, but this is at least some way of linking things.
Hmm. Specifying an incorrect validator to change a rendering mode in a specific set of browsers feels... well pretty nasty. It feels like the "old days".
I think maybe you're confused? The doctype keeps the browser in standards mode and isn't modified in the amp pages. It only changes the rendering mode in the sense that adding it to any html page changes the rendering mode.
Yes, I'm following that. It keeps it in standards mode because it's saying "Hey, this page is HTML5" and browsers can say "Oh good, a modern standards compliant website, this should be just fine"
What I mean is that these AMP pages are not valid HTML5. I don't like the idea of adding a tag which says "this is valid HTML5" when it isn't, just so that there is a side effect of changing the rendering mode that browsers use.
Two URLs are optional. You can make one page that is AMP valid and point link rel=canonical to self. This is still useful as it helps avoid multiple URLs for the same resources a.l.a. www.foo.com vs foo.com and ?meaningless_parameter.
Two URLs are only optional if I don't want to add anything to the page that's not allowed in AMP. Or if I don't want to have a bunch of external JS required just to show images.
This sort of "same content, different view" feels like it's what content-type was designed to solve.
Is it worth having a doctype then? I don't see the logic in adding a description of a validator you then deliberately break.
> As to discovery: You use a link rel=amphtml tag on the canonical and then point the AMP file back via a link rel=canonical
Ah thanks. I'm not a huge fan of having two urls for the same resource, but this is at least some way of linking things.