Reduce google plus button page weight

I am currently developing a website and want to enable the google plus button. However, my problem is that the google plus button adds an extra 300 kb to the page weight. Much of this comes from a single file that calls http://apis.google.com/js/plusone.js .

I managed to reduce page loading time to a minimum by loading it asynchronously, but I would like to know if there is a way to adapt the code to minimize page weight?

Here is the code I'm using ...

<script>
    window.___gcfg = {lang: 'en-GB'};

    (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();
</script>

<div id="google-plusone">
    <g:plusone annotation="none" size="medium"></g:plusone>
</div>

Thanks in advance for your help.

+3
source share
1 answer

, . , , . "" , .

+2

All Articles