Generally we use social sharing buttons on our site to share content of our site on various social networking platforms. These social sharing buttons adds few extra bytes size to your web pages. If someone is browsing that particular web page with slow internet connection then it will cause a clutter. To avoid this especially on Responsive Designs, you can load social sharing buttons conditionally and stop them to load on mobile devices to avoid clutters.
How to Load Social Widgets Conditionally:
Below is a simple technique using which we calculate the width of the browser and if the width exceeds a particular width say 480px only then the social sharing buttons will show up.
Here the best thing is that we are not hiding them using css but instead completely avoiding them to load which will save a lot of loading time when someone is browsing from mobile devices.
To implement conditional loading on your blog /website, first add all the necessary social widgets to your blog using the usual procedure. For instance, you can visit facebook.com to generate code for the Like button while dev.twitter.com will provides codes for the Tweet and Follow widgets of Twitter.
Thats it! You have slowly and successfully moved to the advanced strategies of blogging and SEO. This chapter will definitely help you to reduce the blog’s loading time which is one of the crucial aspects regarding On Page SEO.