Search code examples
amp-html

Can I use AMP (Accelerated Mobile Pages) components/tags on a page that is not a valid AMP page?


Can I use AMP (Accelerated Mobile Pages) components/tags on a page that is not a valid AMP page?

Will I have advantages or disadvantages with this? Is it a good practice or not?

I would like to use the AMP components/tags by the way it load the elements (like amp-carousel and amp-img), but I can not fully convert my website to AMP since I have custom javascript codes that AMP page dont allow that I use (that do not apply using amp-iframe).

Is it better for me to keep standard elements and other libraries, or is it valid for me to use AMP components even though the page is not a valid AMP page?

Thanks!


Solution

  • The major advantage of AMP is making the loading time better. You can achieve that by getting rid of Javascript, replacing img with amp-img etc. AMP offers plenty of it's own JS implementations for example for Twitter, Google Analytics, Pinterest and so on. See here: https://www.ampproject.org/docs/reference/components

    Here you can find the information, that custom Javascript is restricted: https://www.ampproject.org/how-it-works/

    If you don't want to resign from custom dynamic content, you can have two versions of you page and link them in <head>.

    Disadvantages of having not fully AMP conform page? I think that Google might not index AMP pages that are not fully valid with AMP validation rules.