Prefer Asynchronous Resources

168 views
Skip to first unread message

bhushan chhaya

unread,
Aug 25, 2014, 3:49:30 AM8/25/14
to pagespeed-ins...@googlegroups.com

Prefer asynchronous resources

Fetching resources asynchronously prevents those resources from blocking the page load.
Learn more

Suggestions for this page

The following resources are loaded synchronously. Load them asynchronously to reduce blocking of page rendering.

how to solve this issue.. i already added following tag.

<script type='text/javascript'>
  (function() {
    var po = document.createElement(&quot;script&quot;); po.type = &quot;text/javascript&quot;; po.async = true;
    var s = document.getElementsByTagName(&quot;script&quot;)[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

&lt;/script&gt;
&lt;div id=&quot;navbar-iframe-container&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;https://apis.google.com/js/plusone.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

please guys help me out :'(

Miguel García Sánchez - Colomer

unread,
Aug 25, 2014, 4:30:39 AM8/25/14
to pagespeed-ins...@googlegroups.com
Hi!,
i'll try to explain what you have to do:


To use the asynchronous version of plusone.js, visit this page: https://developers.google.com/+/web/api/javascript?hl=en go to the "Loading the JavaScript API asynchronously" chapter. Test it and when you have it perform correctly, (making a buckup before) delete the synchronous call to use only the asynchronous.


show_ads.js it's from Google AdSense program. Follow these instructions to use the Asynchronous version: https://support.google.com/adsense/answer/3221666?hl=en


Best regards!!!,

Miguel.

pulkit malik

unread,
Mar 28, 2015, 5:50:16 AM3/28/15
to pagespeed-ins...@googlegroups.com
Hi Miguel,
Even I have the same issue. I'm using blogger. whenever I'm using async defer in the code it is showing me the following error

Error parsing XML, line 584, column 60: Attribute name "async" associated with an element type "script" must be followed by the ' = ' character
please help me. TIA :) 
Reply all
Reply to author
Forward
0 new messages