Grow your CSS skills. Land your dream job.

Move JS into footer (wordpress)

  • # January 7, 2010 at 4:03 pm

    Hi,

    Am struggling with speed on my site getting a overall grade of F from Yslow..

    I read that moving JS into the footer can help this.. how would i go about it? I found a plugin that was supposed to do this but I don’t think it works with wordpress 9 cause am still getting a F for Javascript :~

    Thanks

    # January 7, 2010 at 4:53 pm

    Lee, Lee, Lee… haha

    For starters, why do you have a 190KB sprite loading? Surely you aren’t using ALL of those icons???
    http://www.leehughes.co.uk/wp-content/p … sprite.png

    You are loading jQuery three (yes, THREE!) times, each one is around 55KB
    1. leehughes.us1.list-manage.com … om/js/jquery-1.2.6.min.js
    2. jqueryjs.googlecode.com … files/jquery-1.3.2.min.js
    3. http://www.leehughes.co.uk … s/js/jquery/jquery.js?…

    You have a total of 6 different CSS files loading.

    You have 24 different javascript files loading. All in all you’re loading almost 400KB of javascript files… you should be aiming for around 70KB on a heavy javascript site in my opinion.

    Moving your JS into your footer probably isn’t the answer here…

    # January 7, 2010 at 4:59 pm

    Hey Doc

    Am back! :D haha

    am not using all the icons no.. check out my comments section where that plugin is they are the only ones am using.. Not sure why they are coming up.. maybe delete them from the folder and upload them again?

    Ok.. So need to get rid of all that jquery then..

    Where did you find all that??

    Am currently trying to figure out how to minimise my JS then am going to use this http://rakaz.nl/projects/combine/combine.phps so it combines everything in one file.. That’s my plan anyway.. What do you think?

    # January 7, 2010 at 5:00 pm

    That wil probably explain my 62% bounce rate as well.. people are so impatient these days!! :P

    # January 7, 2010 at 5:09 pm

    Sorry wrong link http://rakaz.nl/code/combine

    # January 7, 2010 at 5:53 pm

    Fire your site through here:

    http://www.websiteoptimization.com/services/analyze/

    # January 7, 2010 at 5:57 pm

    i can feel many headaches coming on :)

    cheers Doc

    # January 7, 2010 at 6:44 pm

    I found a plugin called WP minify which has given me a ySlow rating of grade C now :)

    however, my css has gone :(

    [img]http://i45.photobucket.com/albums/f56/phi21/Screenshot2010-01-07at233614.png[/img]

    But up two grades is pretty good eh :)

    Still fine tuning.. Not stopping till I get A

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".