最近我听说过Accelerated Mobile Pages项目,并阅读了一些有关它的信息.
我想知道如何在现有的基于Ionic和Angular的网站上实现它?
基本上没有几乎可能的解决方案.如果您查看doc
here.
原文链接:https://www.f2er.com/angularjs/141103.htmlKeep 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.