Jump to content

How To Make Fewer HTTP Requests?


Recommended Posts

Hi guys,

 

I'm using PS 1.5.4.1 and my site is getting a Grade F using Yslow (Firebug) regarding the HTTP requests. But i don't know what this means.

 

Below is a screenshot of my test results.

 

Questions:

1) how to combine 7 external Javascript scripts into one?

2) How to combine 5 external stylesheets into one?

3) How to combine 24 external background images using CSS sprites?

 

FYI i don't know what javascripts, external stylesheets, css sprites means :-) So if you do have a possible answer for me. I'd be much obliged if you'd use baby-steps in your communication :D.

 

Does anybody (or King Vekia) :P have some tips for me to solve this problem?

 

Thank you in advance.

 

Sam

 

 

www.verwarmingsshop.be

post-452003-0-31517000-1372158896_thumb.jpg

Edited by Optimus_Sam (see edit history)
Link to comment
Share on other sites

  • 1 month later...

I am also needing some help with this one. I'm using Prestashop 1.5.

 

GTmetrix says "This page has 3 external stylesheets. Try combining them into one. This page has 14 external background images. Try combining them with CSS sprites."

 

Any idea on what I need to do. This is a High priority according to GTmetrix and slowing my site down! I've already did what Piotr suggested prior to running GTmetrix.

 

Thanks!

Link to comment
Share on other sites

  • 1 year later...
  • 2 weeks later...

Hi,

If you already turned on CCC, there may well be difficulty with combining all remaining css and js in that it can cause conflicts, e.g., there can be unintended css selector overrides, etc. Or, sometimes you can load js at the end of the page, sometimes not. So it often is trial and error to see what can be combined and what has to be separately loaded.  You'd have to go into the cache, combine the css and play with the order to see what works or not and you'd have to change the link name for the new stylesheet in the head of the page to reflect the new combination and remove the calls for the original ones.  Cumbersome and time-consuming for what I have experienced as only minimal gains in the past.

 

As for combining background images into sprites, see:

http://spriteme.org/

But if you have knowledge of SASS and COMPASS, you can see:
http://compass-style.org/help/tutorials/spriting/

 

I find the latter easier, though, for me, sprites are never a breeze.

 

@Optimus_Sam, from your attached image, it looks like the site in question is http://verwarmingsshop.be  It appears that there are other issues playing a greater role in your page load delays.  You've got 2 redirects, http://www.zet-shop.be/ and http://zet-shop.be/ And there is a wait of about 1.6 seconds before the server responds.

 

If you review the results for your site here:
http://gtmetrix.com/reports/verwarmingsshop.be/p4JOmvX3

I think you'll find a number of time-saving recommendations that would probably serve you better than mucking around with the css and js.

 

Link to comment
Share on other sites

thank you @mikewra. on a good day the load time is about 3-4 seconds. bad day its more. from reading, that has nothign to do with PS but the server. im going to remove a few images possibly that will take it down to 2-3 seconds. i cant ask for more than that. i could be here for days with sprites etc. i will also check that module from el patron. great guy, helped me a lot setting up my PS,  all the best

Link to comment
Share on other sites

  • 2 months later...
  • 3 weeks later...
  • 1 year later...

For the sake of completeness, I forgot to mention that for v1.5 front office javascript page load performance, El Patron has a module that will save you time and agony from trying to do it yourself.

http://etiendas.co/en/performance-defer-javascript-16/54-reduce-page-render-time-javapro.html

 

Thanks for mention!  JavaPro IMHO is 'the' must have module for 1.5...I rocked that one...lol

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...