Topic-icon Facebook sdk.js loading delays page load

Active Subscriptions:

None
11 years 9 months ago #46855 by pawan.m
Facebook loading on the home page is taking the maximum time: delaying the home page load at our website maslowed.me, as checked at Gtmetrix.
connect.facebook.net/en_GB/sdk.js

Some blogs on internet suggest that it can be made async.
- Will it be fine to make this async, or will it affect the working of login/share functionalities: currently we have a menu option as login. The page load doesn't immediately need to open login on load.
- Is there a place in jfbconnect code/configuration etc where we can do this?

Best,
Pawan.
The topic has been locked.
Support Specialist
11 years 9 months ago #46863 by alzander
The Facebook Javascript code is already loaded asynchronously and is done in the way that Facebook recommends for the least load intensive way. The file needs to be loaded, but the asynchronous way that we're doing it shouldn't be blocking other elements from loading on the page.

Also, please note that the Facebook Javascript file is cached by browsers and most users have already visited a site that will load that file. That means that tools like GTMetrix will show it takes some time to download. Most standard users will already have that file cached when they visit your site (and definitely as they navigate to different pages), so the impact should be minimal in most cases.

I hope that helps,
Alex
The topic has been locked.