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

前端之家收集整理的这篇文章主要介绍了angularjs – 我如何在角度/离子网站中实现AMP?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
最近我听说过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.

猜你在找的Angularjs相关文章