JavaScript to Footer

The Yahoo! Exceptional Performance team recommends placing scripts at the bottom of your page because of the way browsers download components.

"The problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won't start any other downloads, even on different hostnames.

In some situations it's not easy to move scripts to the bottom. If, for example, the script uses document.write to insert part of the page's content, it can't be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations."

WordPress default behavior is to load JavaScript in the <head> page.

This plugin will move all javascript code to the footer if the plugins have declared JavaScript properly.

Download

dl WP Figlet

Installation

1. Upload the whole plugin folder to your /wp-content/plugins/ folder.

2. Go to the Plugins page and activate the plugin.

3. Try your blog and check if all plugins work properly. Footer JavaScript may break some plugins so check everything first!

Frequently Asked Questions

How do I correctly use this plugin?

Just enable the plugin and check your blog pages. If all plugins appear to be working correctly you are set!

Additionally you may install YSlow enchancment for Firebug, a popular addon for Firefox browser. YSlow will help you determine your site choke points.

Other

You can also visit my other WordPress Plugins.

If you are looking for WordPress services, feel free to contact me.

78 Comments

  1. May 17th, 2014

    This is really amazing WordPress Optimization Tips :) Combing JS,CSS using Cloudflare or W3TC plugin is another alternative solution.

  2. Mar 25th, 2014

    It's a nice plugin and nice article.

  3. Nov 16th, 2013

    Thanks for this plugin. But in my case, I can't use it because some of my codes in my site is broken when I used it. Any help will be appreciated. thank you!

  4. Mar 8th, 2013

    Is there any way to except certain javascript files from being moved? Specifically, I'd like jQuery to load in the head (I have to leave it there because my theme inserts some script tags in the body), while all others are moved to the footer. Possible?

  5. Darrel
    Jan 31st, 2013

    Near perfect results for me except for one really big one, Cufon Font replacement. Am I missing something?

  6. Stefan
    Jan 25th, 2013

    Seems like doesn't work with WP 3.5. Can you have a look on it, please?

  7. Jun 4th, 2012

    Hi, thanks for a great plugin!
    Please, may you help me? Nextgen Gallery (just flash - JR Image Rotator) does not work when Java Script to Footer plugin is enabled. I apologize for my English, I knopw it's not the best... Bye

  8. Apr 19th, 2012

    Thanks so much for the plugin
    Unfortunately it broke some features on my site. How would i go about undoing what the plugin does?

  9. Feb 28th, 2012

    I can't use this plugin with s3flowshield, any chance you can take a look and see if we can get it fixed?

  10. Dec 22nd, 2011

    Well, the plugin works perfectly for me ,none of my plugins yet broken. But the yslow till shows that i dont have my scripts added to the footer. What might be the case?

  11. Oct 24th, 2011

    Wow! Seemed to have broken my header menu but solved so many problems in one go that I'll happily change the menu and keep the speed boost.

  12. Matt Herzberger
    Aug 4th, 2011

    Didnt realize there were two places to post comments. Is this working in 3.2.1

  13. Jun 10th, 2011

    Cool plugin. I installed it and pages were blazing. Only one plugin, Sharebar, won't load. Any ideas?

    • Aug 6th, 2011

      I have the same problem..sad..
      Wish we can set which ones that we want to keep in the head? :)

      • Aug 15th, 2011

        It worked on my site until i installed a Premise Plugin

        it does not work with Premise Landing Page plugin (tabbed scroller template)
        I wish i can exclude which script that stays and which one goes to the footer

  14. May 25th, 2011

    Howdy,

    I've added this plugin and cleared the cache (using W3 Total Cache) and it appears no JS files have moved to the footer.

    Have you come across this before?

    Matt

    • May 25th, 2011

      Noting, I have tried disabling the "JS minify settings" and it made no difference

  15. May 4th, 2011

    I love this plug in. some thing changed somewhere and I am struggling to find out where, but when JS Footer is active, JR Image Rotator does not work and my site reports that i need flash player and Js to make it work. What am I missing. My site has been slower and less efficient since that change, and for the life of me, i cannot figure it out.....

    Thanks for your help. I hope that I can resume using your AWESOME plugin soon.

    Dave

  16. May 4th, 2011

    Thanks for sharing, i'm about to download it now. wish me luck :)

  17. Mar 16th, 2011

    Many Thanks for your job....I have added your website to my http://www.automotivespace.it/connessioni/

  18. Dec 18th, 2010

    Thanks for sharing, i'm about to download it now. wish me luck :)

Have your say

Your email is never published nor shared. Required fields are marked *

*
*

  • ManageWP