加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 我如何在角度/离子网站中实现AMP?

发布时间:2020-12-17 08:52:00 所属栏目:安全 来源:网络整理
导读:最近我听说过Accelerated Mobile Pages项目,并阅读了一些有关它的信息. 我想知道如何在现有的基于Ionic和Angular的网站上实现它? 基本上没有几乎可能的解决方案.如果您查看doc here. Keep all third-party JavaScript out of the critical path Third-party
最近我听说过Accelerated Mobile Pages项目,并阅读了一些有关它的信息.

我想知道如何在现有的基于Ionic和Angular的网站上实现它?

基本上没有几乎可能的解决方案.如果您查看doc here.

Keep all third-party JavaScript out of the critical path

Third-party JS likes to use synchronous JS loading. They also like to document.write more sync scripts. For example,If you five ads,and each does three sync loads,with a 1 second latency connection,you’re in 18 seconds of load time just for JS loading.

AMP pages allow third-party JavaScript but only in sandboxed iframes. By banning them into iframes,they can’t block execution of the main page. Even if they trigger multiple style re-calculations,their tiny iframes have very little DOM.

Style-recalculations and layouts are typical to DOM size,so the iframe recalculations are very fast compared to a recalculating styles and layout for the page.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读