Home › Forums › JavaScript › Move JS into footer (wordpress)
- This topic is empty.
-
AuthorPosts
-
January 7, 2010 at 4:03 pm #27483leehughesMember
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 #69061TheDocMemberLee, 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.pngYou 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 #69063leehughesMemberHey 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 #69064leehughesMemberThat wil probably explain my 62% bounce rate as well.. people are so impatient these days!! :P
January 7, 2010 at 5:09 pm #69067leehughesMemberSorry wrong link http://rakaz.nl/code/combine
January 7, 2010 at 5:53 pm #69084TheDocMemberFire your site through here:
January 7, 2010 at 5:57 pm #69087leehughesMemberi can feel many headaches coming on :)
cheers Doc
January 7, 2010 at 6:44 pm #69090leehughesMemberI 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
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.