Using amp script in non-amp page

前端 未结 2 890
攒了一身酷
攒了一身酷 2021-01-25 00:03

There are side effects using script amp in standard html5 pages?

My idea is to use amp-iframe to show some related content, also in web pages and not only in amp pages.<

相关标签:
2条回答
  • 2021-01-25 00:43

    I have tried some month ago.
    My idea was to use the https://cdn.ampproject.org/v0.js to load images async for performance.

    Same to use the flying carpet and the Carousel on my regular site. The result was the internal validator brings to much errors, the script breaks, you need the Boilerplate and so on.

    So the answer is you can't use the AMP script on a 'normal' HTML site. Or you take the script and modify it for you. But you will lost the on going support of all changes.

    0 讨论(0)
  • 2021-01-25 00:53

    I haven't seen side effects yet of a nonamp/amp hybrid page. I'm currently using https://cdn.ampproject.org/v0.js for img control (ex: lazy load) on a non amp page.

    I'll guess this is not the type of bad coding that Google will result in a rank penalty.

    My nonamp page has:

    • Link tag to refer to the real amp page.
    • Google Chrome detects it's nonamp page and suggests the amp page version.
    • No boilerplate.
    • Used nonamp analytics.
    • Did not use thunderbolt or amp in html tag.

    Images didn't show up on Blu windows 8 phone. Suspect amp script at fault. Images do show up on Android smartphone.

    0 讨论(0)
提交回复
热议问题