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

回眸只為那壹抹淺笑 提交于 2019-12-01 01:56:58

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.

I don't think this is going to work as one of the design principle of AMP is to Keep all third-party JavaScript out of the critical path, meaning no author-written Javascripts except those specified by AMP Pages. So it's either you have an AMP version of your website or a non-AMP (canonical) version.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!