- This topic has 2 replies, 1 voice, and was last updated 7 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forums › Developing Websites › HTML PHP Snippets › Why We Should Use Asynchronous Scripts for Fast Loading Websites
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.When I was checking out my page speed problems, this was one thing that was mentioned. The problem is easy fixed because all I needed to do was update my old codes.
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 defaultChartBeat (static.chartbeat.com/js/chartbeat.js) : doc, blog post - async by defaultClicky (static.getclicky.com/js) : blog postDisqus (disqus.com/count.js, disqus.com/embed.js) : doc, blog post - async by defaultFacebook (connect.facebook.net/.../all.js) : doc, blog post - async by defaultGoogle AdSense (pagead2.googlesyndication.com/pagead/show_ads.js) : doc, blog postGoogle Analytics (google-analytics.com/ga.js) : doc, blog post - async by defaultGoogle DFP GPT (www.googletagservices.com/tag/js/gpt.js) : docGoogle Plus (apis.google.com/js/plusone.js) : doc, blog postNew Relic (d7p9czrvs14ne.cloudfront.net/11/eum/rum.js) : doc - async by defaultPinterest (assets.pinterest.com/js/pinit.js) : docShareaholic : doc - async by defaultShareThis (w.sharethis.com/button/buttons.js) : docScorecardResearch/Comscore (b.scorecardresearch.com/beacon.js) : doc - async by defaultStumbleUpon (platform.stumbleupon.com/.../widgets.js)Quantcast (quantserve.com/quant.js) : doc - async by defaultTwitter (platform.twitter.com/widgets.js) : doc - async by defaultTynt (cdn.tynt.com/tc.js)Yandex (mc.yandex.ru/metrika/watch.js)
One simple example is your Adsense ads. They still use the old synchronous script so you might get this warning for them. Easy solved though... Go to get the new Adsense ad code that uses the new Asynchronous Script. When you hit the "get code" link there will now be a drop down menu. Now you can choose Asynchronous Script.