× Joomla Facebook Connect support forum

Topic-icon Load location for jfbconnect.js

Active Subscriptions:

None
7 years 3 weeks ago #44152 by jefvs
Hey JFBC'ers
I've been working on our Google PageSpeed and it keeps on yapping at me about the jfbconnect.js file being in the <head> because it is a render-blocking JS.

Can I try to set things so that the jfbconnect.js is loaded at the bottom of the page?

Thanks a bunch

Best
J
The topic has been locked.
Support Specialist
7 years 3 weeks ago #44161 by alzander
I think it should load at the bottom just fine, but you'd need to test and make sure of that for your configuration. In general, it *is" load-blocking JS but most browsers nowadays will do look-ahead loading and continue on anyways... so the impact is usually small to non-existent.

Those messages are quite annoying though, so I understand why you'd want to fix it.

Finally, if you're still using Joomla 1.5, please take the time to read our Facebook Graph API v2: What's Changed and What it Means blog post. Specifically, the "Ugly" section about Joomla 1.5 compatibility with the recent updates to Facebook.

I hope that helps, and best of luck,
Alex
The topic has been locked.
Active Subscriptions:

None
7 years 3 weeks ago #44248 by jefvs
Thanks! I will give it a shot.

I've been looking all over the code though and can't seem to find out where the code is that injects the jfbconnect.js file into the Joomla Document / head - could you point me toward the right file(s) please?

Thanks! Have a good night :=D
The topic has been locked.
Support Specialist
7 years 2 weeks ago #44252 by alzander
The jfbconnect.js, and related Javascript, is inserted from the /components/com_jfbconnect/provider/facebook.php file. Around like 350, you'll see:
$doc->addScript(JURI::base(true) . '/components/com_jfbconnect/includes/jfbconnect.js?v=6');
That, and the code below it, are the features you'll want to move to lower in the document.

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

None
7 years 2 weeks ago #44255 by jefvs
Thanks a lot Alex. Your support has always been great and much appreciated :B:
The topic has been locked.
Support Specialist
7 years 2 weeks ago #44265 by alzander
Glad to help however we can. If you need anything else, as always, just let us know.

I hope you consider upgrading to Joomla 2.5+ and using the newest release of JFBConnect. You'll probably be blown away by all the great changes when you do.

Best of luck,
Alex
The topic has been locked.
Social Stream
Hide. Seek. Play!

Countdown Hide & Seek Game

Countdown, the new hide & seek toy, is available now! Designed and developed by the founders of SourceCoast, it's the perfect toy to get your kids moving at all ages.

Learn More About the Hide and Seek Toy