Speed Up Your CS-Cart eCommerce Website - Step 1

Hello All,



[SIZE=“3”]First of all, let’s go to check your website’s results on GTMetrix:[/SIZE]



[url]http://gtmetrix.com/[/url]



On WebPageTest:



[url]http://www.webpagetest.org/[/url]



And on Zoompf:



[url]http://zoompf.com/[/url]



*****



Nowadays, Google takes into account the speed of your website to determine your ranking in SERP.



[url]http://www.mattcutts.com/blog/site-speed/[/url]



[url]http://www.mattcutts.com/blog/minty-fresh-indexing/[/url]



[SIZE=“3”]The fastest and easy way to speed up your website, is to turn on the gzip compression.[/SIZE]



What is gzip compression?



The server compresses your pages by zipping them before sending to your visitors. Thus, the weight of your pages is lighter and therefore faster to load. Your site becomes faster, becoming compatible with the new Google rules.



How do I know if I can get gzip compression?



Follow this path:



Backoffice > Administration > Database > (click on link) “PHP Information”



On the new page that appears, search for “mod_deflate”



If “mod_deflate” is in “Loaded Modules”, then you officially have the ability to turn on gzip compression.



If “mod_deflate” is NOT there, don’t worry, read more…



How to officially have the gzip compression?



You have “mod_deflate” in “Loaded Modules”.



Edit your “.htaccess” file on your root and add this code:




SetOutputFilter DEFLATE





Please, note this:



If you have Smartoptimizer, add this code:




SetOutputFilter DEFLATE





Nota Bene:



Smartopitimizer is faster on JS and CSS than “mod_deflate” because it manages JS and CSS in static way. So, don’t put these files on “mod_deflate” if you have Smartoptimizer!



How to unofficially have the gzip compression?



You have NOT “mod_deflate” in “Loaded Modules”.



Edit your “index.php” file on your root and add to the first line, right after the CS-Cart copyright comments:


# Gzip here, because my web hosting company does NOT turn on gzip "mod_deflate".
ob_start("ob_gzhandler");




or:


# Gzip here, because my web hosting company does NOT turn on gzip "mod_deflate".
if(!ob_start("ob_gzhandler")) ob_start();




Test your page for gzip compression:



[url]http://www.whatsmyip.org/http_compression/[/url]



If you get a [COLOR=“Red”]red cross[/COLOR] , NOT a [COLOR=“Green”]green check[/COLOR] , thus, gzip compression is locked. Ask you support to know why.



Check your new results on GTMetrix:



[url]http://gtmetrix.com/[/url]



On WebPageTest:



[url]http://www.webpagetest.org/[/url]



And on Zoompf:



[url]http://zoompf.com/[/url]



Taste the difference :cool:







Lee Li Pop

Thank you Lee, I didn’t even know that I didn’t have gzip compression, now I do :wink:

Hello E.Qi.Librium,



Your GTMetrix results are for your website in your signature:



YSlow Grade: (79%) C



Google Page Speed Grade: (77%) C



Better than the official CS-Cart demo results:



[url]Instant Demo - CS-Cart Multi-Vendor Demo Try Free for 15 days



YSlow Grade: (57%) E



Page Speed Grade: (70%) C



If you follow me trough all steps, you can easily get +85% B.



If you clean up and correct your code, you can easily get +90% A.



Go from E-C to B-B and (why not) A-A and your website will be from x2 to x4 times faster.



Easy way! :cool:



Remember:



A faster website, brings more customers and you get more money!



Everything is FREE, everything is made by yourself!



A last word, everything is as easy as this first step…



So, stay tuned on the Lee Li Pop’s optimization station!





Lee Li Pop

Lol, can’t wait for next lesson :wink:

Went from E-D to D-C.



Let’s hear step two!



Thanks

This is some great information, thanks for the tips and look foward to more. :slight_smile:

Excellent advice.



Thank you.



By the way, would this compression also help speed up the admin area (if added)?

[quote name=‘glyndon’]By the way, would this compression also help speed up the admin area (if added)?[/QUOTE]



Yep





Edit: What’s the next one Lee Li? I am waiting for you to tell me something I don’t already know. :stuck_out_tongue:

Hello The Tool,


[quote name=‘The Tool’]

Edit: What’s the next one Lee Li? I am waiting for you to tell me something I don’t already know. :p[/QUOTE]



Let me reassure you right away: You know everything, because you successfully manage your site yourself!



In fact, there are steps that are already present on this forum in detail, or that have been discussed as an example or model. I’ll include them anyway, well, readers, even in the years to come, will have the opportunity to easily follow and understand these steps.



However, that’s a heavy thing than to explain in detail how I do.



Let me time to prepare steps.



I write a memo list of steps, for sure, there are over 10 (closer to 15 actually).



Please don’t be rushed. I hope that the last step will be released before Christmas. Sorry to be so slow, but I want to be as specific as possible.





Lee Li Pop

I commend you (and I am sure others appreciate it very much) for what you are doing but I think the long you wait, the more the information gets cluttered and confusing because of all of the posts in between (Like all of the other information in these forums).

Can we do this if we are running WEBO?

[quote name=‘nathand’]Can we do this if we are running WEBO?[/QUOTE]



In a nut shell…no. Webo costs a lot of money and these are steps that you can take that are the equivalent (but not exactly) to using Webo.



Edit: These steps are what you can do without paying the price of Webo.

Hello The Tool,


[quote name=‘The Tool’]In a nut shell…no. Webo costs a lot of money and these are steps that you can take that are the equivalent (but not exactly) to using Webo.



Edit: These steps are what you can do without paying the price of Webo.[/QUOTE]



I agree with you, WEBO is quite expensive, however, it’s a reliable plug and play module, and perfect for newbies or in hurry people.



My “solution” comes from my experience, nothing is guarantee, just time spent…



WEBO is a “no issue”, as Tirade written:



[url]http://forum.cs-cart.com/showthread.php?t=17895[/url]



Nevertheless, I want to get the know how, even if road is longer and harder :wink:



Hello Nathand,


[quote name=‘nathand’]Can we do this if we are running WEBO?[/QUOTE]



I’ve tried WEBO in the past and I’ve removed it. You can read me thoughts in this thread:



[url]http://forum.cs-cart.com/showthread.php?p=95718#post95718[/url]



It seems to me the free basic edition of WEBO does NOT turn on Gzip. So, yes, you can follow this step one, and turn on Gzip with WEBO.



Let us know your results before/after.





Lee Li Pop

Wow this made a HUGE difference :smiley: Thank you!

Hello Btrials,



Glad to help an “old community follower”!



Yes, CS-Cart has a lot of power hidden!





Lee Li Pop

Hi all, my first post here.



I have a question. I have followed all the steps and the websites is really faster now.

The problem is that now i can’t open pdf attachments files or they require 5 minutes to open. The files are resident into the server. If i go back with old configuration (no gzip compression) the website is slower but i can download the pdf attachments.

Any idea?



Thx in advance

Hi thank you for the hints, the website is really faster now.

But I have a problem. I have some attachments (.pdf files mostly) and with the compression i’m not able anymore to open them or it requires more than 5 minutes to do it. I had to remove the gzip compression at the end of the day.



I had not the mod_deflate originally in Loaded Modules, but I followed the procedure and it worked.



Any idea?

Insane difrence :slight_smile:



Tha pageload is Much faster

Original Size: 46.63 KB

Gzipped Size: 8.82 KB

Data Savings: 81.09%

Does this just work for CS 2.? or does it work for 1.3.5 sp4?

has nothing to do with the cart, it is an http setting for the server/browser to negotiate. Hence compression can be used with any site and any data as long as the web-server and the browser agree on the compression technique.