Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Jitendra Vyas
Jitendra Vyas
2,349 Points

Which problem should be solved first to improve performance suggested by yslow?

Which problem should be solved first to improve performance suggested by yslow?

This page has 20 external Javascript scripts. Try combining them into one.
This page has 20 external stylesheets. Try combining them into one.
This page has 20 external background images. Try combining them with CSS sprites.

4 Answers

James Barnett
James Barnett
39,199 Points

To add on what @Caroline said, I'd minify the CSS & Javascript files you have access each down to one file.

Instead of sprites I'd recommend:

I'd also check out your page on loads.in to see if there are any particular assets that are slowing down your page load time.

Alan Johnson
Alan Johnson
7,625 Points

I'd go after combining javascript and stylesheets first. Those are pretty much always really easy tasks to knock out.

Spriting your background images can be a little trickier, but tools like SpriteMe can be super helpful in getting that put together if you're looking for a quick step to pull it off.

Jitendra Vyas
Jitendra Vyas
2,349 Points

OK. I just checked again that many JS are loading fron Facebook and Google CDN

Caroline Hagan
PLUS
Caroline Hagan
Courses Plus Student 12,453 Points

Not much you can do about external sources; just compress the ones you do have access to, the best you can :-)