Jump to content

Make fewer HTTP requests

Featured Replies

Posted

When I run YSlow, I get a grade F for "Make fewer HTTP requests. Here's what my description looks like:
Grade F on Make fewer HTTP requests

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

Strangely, I seem to see this VERY frequently on other sites, not just sites powered by Invision.

Does anyone here have any experience with this and know how I can optimize this?

no experience with the specific tool but all the above are cached on your computer so the first time you need to download the files and after that on every other page/ refresh it will use the local ones until such a time as they expire/ are changed.

You could try enabling minify in your ACP, this will combine most of the Javascript requests into one.

  • Author

You could try enabling minify in your ACP, this will combine most of the Javascript requests into one.


Could you please explain how minification combines requests?

Instead of having many CSS or Javascript requests, they are combined into one.

like so:

<link rel="stylesheet" type="text/css" media='screen,print' href="http://<domain>/public/min/index.php?ipbv=32005&amp;f=public/style_css/css_1/ipb_help.css,public/style_css/css_1/calendar_select.css,public/style_css/css_1/ipb_common.css,public/style_css/css_1/ipb_styles.css" />



Minify caches that request, so that it has that file to serve up quickly in future, it also GZIPS the content, and sets expires headers, so the content should be cached by the end users browser.

  • Author

I already have minify CSS and JS enabled in ACP though.

We need sprites for sure. I checked Xenforo.. it's blazing fast. Brandon says sprites doesn't help much but each speed optimizer tool says use sprite.. dunno

  • Author

We need sprites for sure. I checked Xenforo..


I don't understand what you're saying here. Are you saying that "I" need sprites?

We need sprites for sure. I checked Xenforo.. it's blazing fast. Brandon says sprites doesn't help much but each speed optimizer tool says use sprite.. dunno



Give it a month or two. They were negative about the canonical tag too when it was introduced, and probably many other things recommended by SEO experts.


I don't understand what you're saying here. Are you saying that "I" need sprites?



He meant "we" as in IPS' customers :)
  • Author

I'm still stuck on how to combine my CSS and JS into "one" then.

9 JS and 5 CSS is perfectly normal in a regular installation, there's not much you can do to reduce that. If you check this forum that number is 7 and 4, and I'm guessing your additional requests come from modifications.
If you run Google Page Speed instead, I'm sure it'll tell you something else about the requests.

  • Author

What about this then?

Grade F on Compress components with gzip

There are 9 plain text components that should be sent compressed

http://www.mysite.com/forums/ccs_files/assets/themes/orman/orman.css

http://www.mysite.com/forums/ccs_files/assets/nivo-slider.css

http://www.mysite.com/forums/public/shoutbox_audio/css/theme/jquery-ui-1.8.7.custom.css

http://www.mysite.com/forums/public/style_images/tctc91_pulse/_custom/js/jquery-1.6.2.min.js

http://www.mysite.com/forums/public/style_images/tctc91_pulse/_custom/js/main.js

http://www.mysite.com/forums/ccs_files/assets/jquery.nivo.slider.pack.js

http://www.mysite.com/forums/public/shoutbox_audio/js/jquery-1.4.4.min.js

http://www.mysite.com/forums/public/shoutbox_audio/js/jquery-ui-1.8.7.custom.min.js

http://www.mysite.com/forums/public/shoutbox_audio/soundmanager2-nodebug-jsmin.js



I've been trying to figure out to do this but can't.


What about this then?



Grade F on Compress components with gzip



There are 9 plain text components that should be sent compressed


http://www.mysite.com/forums/ccs_files/assets/themes/orman/orman.css

http://www.mysite.com/forums/ccs_files/assets/nivo-slider.css

http://www.mysite.com/forums/public/shoutbox_audio/css/theme/jquery-ui-1.8.7.custom.css

http://www.mysite.com/forums/public/style_images/tctc91_pulse/_custom/js/jquery-1.6.2.min.js

http://www.mysite.com/forums/public/style_images/tctc91_pulse/_custom/js/main.js

http://www.mysite.com/forums/ccs_files/assets/jquery.nivo.slider.pack.js

http://www.mysite.com/forums/public/shoutbox_audio/js/jquery-1.4.4.min.js

http://www.mysite.com/forums/public/shoutbox_audio/js/jquery-ui-1.8.7.custom.min.js

http://www.mysite.com/forums/public/shoutbox_audio/soundmanager2-nodebug-jsmin.js



I've been trying to figure out to do this but can't.


"if" you can make it play nicely... 2 of those requests are duplicate jquery library calls... viably can be axed... only need jquery fired once for its use.
  • Author

I'm not seeing duplicate requests there.


http://www.mysite.com/forums/public/style_images/tctc91_pulse/_custom/js/jquery-1.6.2.min.js

http://www.mysite.com/forums/public/shoutbox_audio/js/jquery-1.4.4.min.js


so these are not two separate calls for the same js library of differing point versions?

  • Author

I'm not exactly sure what the first call is for. I know it's Pulse skin related...just don't know exactly what for. I think it has to do with the navigation menu.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.