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
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,
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
$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,
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,