0

I'm updating my site to AMP but by the time I try to validate I get the following error:

The attribute 'prefix' may not appear in tag 'head'

AMP validation

And the OG namespace declaration uses prefix, how can I workaround this issue?

pedrommuller
  • 15,741
  • 10
  • 76
  • 126
  • 1
    In AMP most of the attributes are prohibited , reference link is https://www.ampproject.org/docs/reference/spec If you are using og tags for implementing social share icons then check this sample example https://ampbyexample.com/components/amp-social-share/ – Lalit srikar Jan 02 '17 at 13:29

1 Answers1

1

Facebook sharing doesn't require the prefix attribute. So an easy workaround is to simply omit the prefix attribute. This is how ampbyexample.com does it and it still works:

https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fampbyexample.com

Nevertheless, the AMP validator should support the prefix attribute. I've filed an issue here.

Sebastian Benz
  • 4,238
  • 1
  • 21
  • 17
  • Actually, I tested the page on the OG debugging tool, and it works as expected, I was just wondering if removing the prefix attribute is going to be the right path, thanks for the heads up. – pedrommuller Jan 03 '17 at 16:27