[wp-trac] [WordPress Trac] #22244: jQuery should register in footer by default

WordPress Trac noreply at wordpress.org
Mon Oct 22 01:16:46 UTC 2012


#22244: jQuery should register in footer by default
--------------------------------------+-----------------------
 Reporter:  ryanve                    |       Owner:
     Type:  defect (bug)              |      Status:  reopened
 Priority:  normal                    |   Milestone:
Component:  Performance               |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  dev-feedback 2nd-opinion  |
--------------------------------------+-----------------------
Changes (by ryanve):

 * keywords:  needs-patch dev-feedback => dev-feedback 2nd-opinion
 * status:  closed => reopened
 * resolution:  wontfix =>
 * type:  enhancement => defect (bug)


Comment:

 @alexvorn2 The reason many WP-powered sites load jQuery in the head is
 ''because'' that is the default behavior and because '''they don't any
 better'''. That's exactly the reason why the default should be changed.
 [http://ucsdnews.ucsd.edu/newsrel/soc/policydefaults06.asp "Perceive the
 default option as a recommendation."]

 The performance benefits of loading scripts in the footer are
 [http://stackoverflow.com/a/2105394/770127 well-documented]. The only
 plausible reason to load jQuery in the head would be it you have a UI that
 relies ''entirely'' on it and you'd rather have users see a blank screen
 than an FOUC. Edge case.

 WP inherits the responsibility of helping guide its users towards the best
 practices. WP's defaults should favor the industry's best practices.

 A lot of people doing something makes it a common practice—not a best
 practice. Would you rather take medical advice from 1 surgeon or a 100
 laymen holding knives?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22244#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list