Forum is closed

Load location for jfbconnect.js

Load location for jfbconnect.js

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

jefvs
useravatar
Offline
19 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Load location for jfbconnect.js

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

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23659 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Load location for jfbconnect.js

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 current/big_smile

jefvs
useravatar
Offline
19 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Load location for jfbconnect.js

The jfbconnect.js, and related Javascript, is inserted from the /components/com_jfbconnect/provider/facebook.php file. Around like 350, you'll see:

Code:

        $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

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23659 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Load location for jfbconnect.js

Thanks a lot Alex. Your support has always been great and much appreciated  current/cool

jefvs
useravatar
Offline
19 Posts
Active Subscriptions:

None
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Load location for jfbconnect.js

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

If you use our extensions, please consider leaving a rating and review at the Joomla! Extension Directory:
JFBConnect | SCLogin

alzander
Alex
useravatar
Offline
23659 Posts
Support Specialist
Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests also viewing this topic
There are 0 users also viewing this topic

Board Info

Board Stats
 
Total Topics:
11407
Total Polls:
0
Total Posts:
48071
Posts today:
2
User Info
 
Total Users:
47248
Newest User:
kafeti
Members Online:
1
Guests Online:
446

Online: 
MeggCargy
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program