homepage Welcome to WebmasterWorld Guest from 50.16.132.180
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library : Charter : Moderators: whoisgregg

JavaScript and AJAX Forum

    
jquery source file, where on page?
whatson




msg:4490752
 11:18 pm on Sep 2, 2012 (gmt 0)

I was wondering where do you place the jquery library on your site. I thought it was supposed to be in the <head> area, but now I have heard it should be at the end of the <bottom>.

Can someone please let me know what is best, and why?

 

whatson




msg:4490795
 3:16 am on Sep 3, 2012 (gmt 0)

oops, I meant at the bottom of the <body>

daveVk




msg:4490799
 3:44 am on Sep 3, 2012 (gmt 0)

Putting it the end of the body apparently reduces total load time. All scripts referenced in header fully load prior to main page.

Fotiman




msg:4491588
 2:04 pm on Sep 5, 2012 (gmt 0)


A <script src="url"></script> will block the downloading of other page components until the script has been fetched, compiled, and executed. It is better to call for the script as late as possible, so that the loading of images and other components will not be delayed. This can improve the perceived and actual page loading time. So it is usually best to make all <script src="url"></script> the last features before the </body>.

[javascript.crockford.com...]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved