Results 1 to 3 of 3

Thread: load javascript last?

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default load javascript last?

    ok. so this is the javascript that slows my page down, and i would like to call on this javascript after my page is fully loaded. Can someone help please.

    Code:
    <script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
    <script type="text/javascript" src="http://twitter.com/statuses/user_timeline/twitter.json?callback=twitterCallback2&amp;count=4"></script>

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I don't know what those scripts do and you can't modify them because they are external.
    However, the way to accomplish this is simply to place this code toward the end of your <body> section... right above </body> if possible.
    But this may involve changing how they are displayed. One option would be using CSS to reposition the elements from the bottom of the page to the top instead, but that might be complex...

    The simple answer is that you cannot do it because those are external scripts. Perhaps you could try to load those scripts after dynamically, using some of the methods discussed in this thread, for example. http://www.dynamicdrive.com/forums/s...ad.php?t=55727
    Note that it isn't easy...
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •