Can I 'enable' js if I embed the 'real' page inside an amp-iframe?

跟風遠走 提交于 2019-12-13 01:50:23

问题


I'm trying to enable AMP (Accelerated Mobile Pages) on a JavaScript dependent page but AMP disallows js. Has anyone had any luck embedding pages with js in amp-iframes? And is this hacky enough that it might have negative SEO implications, perhaps, I'm afraid, quietly in the future? Or is it a super clever (and safe) thing that nobody does for some weird reason? I suspect it is a futile exercise but for the sake of the SEO I am tempted.

What I've learnt so far is that the amp-iframe source (at least) needs to be ssl enabled and it should not be same origin. So one would just need to put it somewhere else. I get that they may not want people doing this but I find it annoying cause my js is finally starting to be well behaved and I think it's unfair that a fast page can't get amp-related SEO points for being fast. Perhaps I'm missing something?

https://www.ampproject.org/docs/guides/amp_replacements.html

来源:https://stackoverflow.com/questions/35248005/can-i-enable-js-if-i-embed-the-real-page-inside-an-amp-iframe

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