Use Asynchronous Scripts

This rule triggers when PageSpeed Insights has detects that you are using the synchronous version of a script instead of its asynchronous version.

Overview

Using asynchronous scripts means that your page can render more quickly. Instead of forcing users to wait for a script to finish downloading before the page renders, a script can be downloaded in the background.

Although most scripts were originally synchronous, newer versions of the scripts have been designed to load asynchronously.

Recommendations

Make sure you are using the asyncrhonous version of your script. The following popular scripts support asynchronous script loading:

  • BuySellAds (s3.buysellads.com/ac/bsa.js) : blog post - async by default
  • ChartBeat (static.chartbeat.com/js/chartbeat.js) : doc, blog post - async by default
  • Clicky (static.getclicky.com/js) : blog post
  • Disqus (disqus.com/count.js, disqus.com/embed.js) : doc, blog post - async by default
  • Facebook (connect.facebook.net/.../all.js) : doc, blog post - async by default
  • Google AdSense (pagead2.googlesyndication.com/pagead/show_ads.js) : doc, blog post
  • Google Analytics (google-analytics.com/ga.js) : doc, blog post - async by default
  • Google DFP GPT (www.googletagservices.com/tag/js/gpt.js) : doc
  • Google Plus (apis.google.com/js/plusone.js) : doc, blog post
  • New Relic (d7p9czrvs14ne.cloudfront.net/11/eum/rum.js) : doc - async by default
  • Pinterest (assets.pinterest.com/js/pinit.js) : doc
  • Shareaholic : doc - async by default
  • ShareThis (w.sharethis.com/button/buttons.js) : doc
  • ScorecardResearch/Comscore (b.scorecardresearch.com/beacon.js) : doc - async by default
  • StumbleUpon (platform.stumbleupon.com/.../widgets.js)
  • Quantcast (quantserve.com/quant.js) : doc - async by default
  • Twitter (platform.twitter.com/widgets.js) : doc - async by default
  • Tynt (cdn.tynt.com/tc.js)
  • Yandex (mc.yandex.ru/metrika/watch.js)