Jump to content

Inline Small CSS HELP, page speed is slow


Recommended Posts

When I go to GTmetrix and put my site in, I get a 'D' page speed rating for my Prestashop site.

"Inline Small CSS -
The following external resources have small response bodies. Inlining the response in HTML can reduce blocking of page rendering.
http://www.mydomain.com/ should inline the following small resources:

I have the box checked. "Compress inline JavaScript in HTML Compress inline JavaScript in HTML after "smarty compile" execution."

It appears I need to do something else for CSS. Please help! My site is slow... and this would definitely help some. Thank you!!

Edited by generalexperts (see edit history)
  • Like 1
Link to comment
Share on other sites

Inlining css means to put the style inside the html in the tag line.

what they say is.... because you have only few lines you should put them in the html instead of loading another css file.

I recommend moving the content of the css to another css file that already loads on the same page, and then eliminate the request of that css.

 

btw: it won't make too much different, this is really minor issue when you want to optimize your site speed.

 

Good luck

Link to comment
Share on other sites

Hey thanks for the clarification on this! Would you be able to give me more details on exactly what I need to do. I know this is only a minor part of the performance but this is one topic I couldn't find any details on. (I'm sure other people out there would like to know how to do this as well). Thanks!

Link to comment
Share on other sites

Lets say that 'shop.css' is loading only in product page, then you can copy the content of the file and paste it in product.css (which loads anyway in product page), so that way you have only 1 file request from the server instead of 2.

of course you will also need to remove the css from the module, probably by editing its template file (.tpl) or php file.

 

but like I said before its not really important and it won't make any different.

if you want to speed your site loading time

 

1. use good web hosting company, if you can get vps its better

2. uninstall all unused modules

3. install php apc (php accelerator)

4. use minify js,css,html (you already are)

5. check for specific modules to see if some slow you down (disable one at a time)

6. make sure you don't have any 404's or console errors

 

after that you can follow google page speed recommendation

 

Good luck

Link to comment
Share on other sites

Wow thanks for the details! Is it as simply as copy paste? I think I can manage that if that's the case. As far a: "you will also need to remove the css from the module, probably by editing its template file (.tpl) or php file." I am not too familiar with the coding here. Would you be able to let me know exactly what file to edit and what to do with the text?

I appreciate your help!!

Link to comment
Share on other sites

  • 1 month later...

I am having the same issue, even though its a minor thing, I still think its good to fix everything listed. If anyone can go into detail that would be great. "you will also need to remove the css from the module, probably by editing its template file (.tpl) or php file." is the toughest part since I/we are not programers or too familiar with coding. Thank you.

Link to comment
Share on other sites

without url is hard to say what you have to change to fix it, so can you please share url to your website?

The following external resources have small response bodies. Inlining the response in HTML can reduce blocking of page rendering.

http://www.vanstonjewelry.com/en/ should inline the following small resources:

Link to comment
Share on other sites

×
×
  • Create New...