TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

Facebook connect script problems.

Discussion in 'Site Feedback' started by TEG, Feb 16, 2011.

  1. TEG

    TEG TMC Moderator

    Joined:
    Aug 20, 2006
    Messages:
    17,250
    Location:
    Silicon Valley
    #1 TEG, Feb 16, 2011
    Last edited: Feb 16, 2011
    Is this site trying to connect to Facebook now?

    Sometimes the site freezes on me, and I get a pop-up like this:

    attachment.php?attachmentid=1406&d=1297919352.jpg

    (I see "Tweet" and "(f)Recommend" links at the bottom of the posts, and this in the code:
    Code:
    <a href="[URL="http://www.teslamotorsclub.com/view-source:http://twitter.com/share"]http://twitter.com/share[/URL]" class="twitter-share-button" ...>Tweet</a>
    <script type="text/javascript" src="[URL="http://www.teslamotorsclub.com/view-source:http://platform.twitter.com/widgets.js"]http://platform.twitter.com/widgets.js[/URL]"></script></span>
    <script src="[URL="http://www.teslamotorsclub.com/view-source:http://connect.facebook.net/en_US/all.js#xfbml=1"]http://connect.facebook.net/en_US/all.js#xfbml=1[/URL]"></script>
    If you look at the actual embedded script, it is fairly big:
    http://connect.facebook.net/en_US/all.js

    Maybe my PC is too old, or my internet too slow, but I think I might have to abandon this site.
     

    Attached Files:

  2. TEG

    TEG TMC Moderator

    Joined:
    Aug 20, 2006
    Messages:
    17,250
    Location:
    Silicon Valley
    I think maybe part of the problem is that I have been using a non-default "show 100 posts per page" setting.
    (That way I could read through lots of old posts without having to use page by page.)
    Unfortunately it seems to have to contact facebook for every post shown.
    I will try showing less posts per page to see if that helps.
     
  3. mpt

    mpt Electrics are back

    Joined:
    Oct 15, 2008
    Messages:
    1,629
    Location:
    Warren, New Jersey, United States
    We're using the same method as you describe. Each button is rendered by the client as each one has a unique url for that post. I think that the problem lies in the facebook link rather than twitter; that seems much faster to render.

    On a 3G connection it does slow down page draw completion but, I see that the twitter and facebook elements are draw async by java script so it doesn't prevent a user from interacting with the page.

    It's our hope to increase engagement with the site.

    Let's see what further feedback brings.
     
  4. TEG

    TEG TMC Moderator

    Joined:
    Aug 20, 2006
    Messages:
    17,250
    Location:
    Silicon Valley
    Switching to 10 posts per page instead of 100 seems to have stopped the warnings and made the pages load faster now.
    Unfortunate as I had liked to be able to see so much history all at once without having to go page by page.

    Even with 10 posts per page the site is slower to load than it used to be.
    When I visit, I typically open a new tab for each thread with new posts so multiple are loading at once.
    This bogs down for quite a while before the tabs are ready to read.
     
  5. cinergi

    cinergi Active Member

    Joined:
    Sep 17, 2010
    Messages:
    2,169
    Location:
    MA
    I had my posts per page set to 40, and this was proving to slow things down a LOT, especially the time it took for FireFox to scroll to the bottom of the page when I'd clicked on a "go to first unread post" link (it would stay at the top of the page for many seconds and then zip down to the bottom). I've set things back to 10 for now but would prefer at least an option for me to shut off the integration (I'll never use it).
     
  6. mpt

    mpt Electrics are back

    Joined:
    Oct 15, 2008
    Messages:
    1,629
    Location:
    Warren, New Jersey, United States
    I've dropt the facebook recommend whilst I figure out how to handle that. The twitter button seems much more responsive.

    Ever? Never recommend a friend checks out TMC? I'm gutted. :crying:
     
  7. cinergi

    cinergi Active Member

    Joined:
    Sep 17, 2010
    Messages:
    2,169
    Location:
    MA
    It's still doing it for me :-( I just loaded a thread (results 281-313) and it loaded all the content, the page moved partway down, the browser sat loading twitter stuff for a while, and 15 seconds later, my browser finally jumped to the last unread post.

    :smile: I find I manually post into FB and not use integration features for things like forum posts ... for whatever reason. *shrug* I'm not a heavy FB user (I'm lucky to post twice a month).
     
  8. mpt

    mpt Electrics are back

    Joined:
    Oct 15, 2008
    Messages:
    1,629
    Location:
    Warren, New Jersey, United States
    ok, I'm going to take the buttons off for now.

    They're quite important I think in this day and age; they're a great way of bringing new users into our world here.

    How would you feel about having the buttons float in the top left so that they were ever-present but not obtrusive?
     
  9. cinergi

    cinergi Active Member

    Joined:
    Sep 17, 2010
    Messages:
    2,169
    Location:
    MA
    It's entirely possible something else is going on ... I've seen different hosts being the last thing Firefox is hanging up on before jumping to the bottom. Like mystatus.skype.com but urls.api.twitter.com is consistently there too. I wonder what would happen if twitter were down...
     
  10. cinergi

    cinergi Active Member

    Joined:
    Sep 17, 2010
    Messages:
    2,169
    Location:
    MA
    (I don't disagree they can be important ... I guess I was just stating my own personal usage of it; sort of wondering if other users would ever use it)

    Much more responsive now ... wow. I'll keep my eye on that to make sure.

    I find floating things slow (e.g. while scrolling) and weird .. I also wonder how it would work on the iPad or an iPhone. Is there not a way to do this without javascript (e.g. a simple hyperlink)? I feel like I'm sounding like I'm doing everythign I can to stop you from turning it on :smile: but I'm really not, I promise!
     
  11. mpt

    mpt Electrics are back

    Joined:
    Oct 15, 2008
    Messages:
    1,629
    Location:
    Warren, New Jersey, United States
    No, I get it, if successful, it will work but not be in the way.

    iOS is tricky, there's no regular way to do it but I've seen it done and, very tastefully, when you scroll it disappears then, fades back in after a moment.

    If not, I can find a place in the bar at the top of the thread.
     
  12. mpt

    mpt Electrics are back

    Joined:
    Oct 15, 2008
    Messages:
    1,629
    Location:
    Warren, New Jersey, United States
    Implemented a fast Tweet button.

    Facebook seems slow regardless as it has to call facebook to determine if any of the buttons have already been pressed and update them.
     

Share This Page