本页内容

当PageSpeed Insights检测到您正在使用同步版(而非异步版)脚本时,就会触发此规则。

概览

使用异步脚本意味着系统可以更快速地呈现您的网页,而不是强制用户等待脚本完成下载,然后才呈现网页。异步版脚本可实现后台下载。

虽然最初的大多数脚本是同步的,但较新版脚本均可实现异步加载。

建议

请确保您使用的是异步版脚本。以下热门脚本均支持加载异步脚本:

  • BuySellAds (s3.buysellads.com/ac/bsa.js):相关博文 - 默认情况下为异步脚本
  • ChartBeat (static.chartbeat.com/js/chartbeat.js):相关文档相关博文 - 默认情况下为异步脚本
  • Clicky (static.getclicky.com/js):相关博文
  • Disqus (disqus.com/count.js, disqus.com/embed.js):相关文档相关博文 - 默认情况下为异步脚本
  • Facebook (connect.facebook.net/.../all.js):相关文档相关博文 - 默认情况下为异步脚本
  • Google AdSense (pagead2.googlesyndication.com/pagead/show_ads.js) :相关文档相关博文
  • Google Analytics(分析)(google-analytics.com/ga.js):相关文档相关博文 - 默认情况下为异步脚本
  • Google DFP广告管理系统GPT (www.googletagservices.com/tag/js/gpt.js):相关文档
  • Google+ (apis.google.com/js/plusone.js):相关文档相关博文
  • New Relic (d7p9czrvs14ne.cloudfront.net/11/eum/rum.js):相关文档 - 默认情况下为异步脚本
  • Pinterest (assets.pinterest.com/js/pinit.js):相关文档
  • Shareaholic:相关文档 - 默认情况下为异步脚本
  • ShareThis (w.sharethis.com/button/buttons.js):相关文档
  • ScorecardResearch/Comscore (b.scorecardresearch.com/beacon.js):相关文档 - 默认情况下为异步脚本
  • StumbleUpon (platform.stumbleupon.com/.../widgets.js)
  • Quantcast (quantserve.com/quant.js):相关文档 - 默认情况下为异步脚本
  • Twitter (platform.twitter.com/widgets.js):相关文档 - 默认情况下为异步脚本
  • Tynt (cdn.tynt.com/tc.js)
  • Yandex (mc.yandex.ru/metrika/watch.js)

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the Apache 2.0 License. For details, see our Site Policies.