Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Any thoughts on gZIP compression and Cs-cart ? Rate Topic   - - - - -

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 21 November 2009 - 02:43 PM #1

Just wondering if there is a simple way to enable gZIP compression on cs-cart pages ?

and if so are there any advantages or disadvantages that anyone has noticed ?

 
  • sridhark
  • Junior Member
  • Members
  • Join Date: 16-Jul 08
  • 32 posts

Posted 21 November 2009 - 03:43 PM #2

you can start with...these lines in your .htaccess file

php_flag zlib.output_compression On
php_value zlib.output_compression_level 5

K Sridhar (Ultimate 4.3.3)


 

Posted 21 November 2009 - 05:14 PM #3

If you are looking to speed it up - this post has the best solution I have found.

Went from a 10+ second load time, to under 3 seconds.

It handles gzip, minify, etc, all in one batch.

Mark
Just Getting Started with CS-Cart
CS 2.08 - Optimized for Speed!
--------------------------------

 

Posted 22 November 2009 - 01:35 AM #4

Thanks NicheBuilder, that helped me a ton! I'm going to use that script for all my projects now!
Custom Web Design, Development and Professional Web Hosting

Jonah Coyote Design

 

Posted 22 November 2009 - 02:05 AM #5

@ Jonah -

I have some pretty aged WordPress sites that I have always used a WP-Cache plugin with. After finding the SmartOptimizer - I pulled the cache plugins and us it for everything!

Small footprint - superb results!

Mark
Just Getting Started with CS-Cart
CS 2.08 - Optimized for Speed!
--------------------------------

 

Posted 22 November 2009 - 04:23 AM #6

WOW, this is one the most useful things I've come across in the last year! Thank you again!
Custom Web Design, Development and Professional Web Hosting

Jonah Coyote Design

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 22 November 2009 - 05:58 AM #7

how exactly did you install SmartOptimizer with cs-cart ?

 
  • brandonvd
  • is Super Awesome
  • Members
  • Join Date: 19-Dec 06
  • 2633 posts

Posted 22 November 2009 - 06:56 AM #8

Yeah, I would love to find this out too. I followed the directions, but between the original post above and now something changed and I can't figure out how to make this work.

Does anyone have any ideas?

Thank you,

Brandon

 
  • kogi
  • Senior Member
  • Members
  • Join Date: 16-Aug 07
  • 634 posts

Posted 22 November 2009 - 11:22 AM #9

Installation Instructions
------------------------
1. Upload smartoptimizer folder to your website.
2. "smartoptimizer/cache" folder should be writable (in most cases 777 permission is needed).
3. Upload .htaccess file on the folder that smartoptimizer folder is placed, if there is no another htaccess file currently.
Otherwise, Copy content of SmartOptimizer htaccess file and paste it inside your current htaccess at the beginning of the file.
4. It's ready. Enjoy it.

 
  • jegesmaci
  • Senior Member
  • Members
  • Join Date: 05-Oct 09
  • 403 posts

Posted 22 November 2009 - 01:12 PM #10

I would be interested in this too.

Adam

 

Posted 22 November 2009 - 01:17 PM #11

@ All -

It was actually very simple -

1 - Upload and decompress the smartoptimizer archive folder to the root of your domain. (Should resolve to: yourdomain.com/smartoptimizer/)

2 - Open your root htaccess and on the top line, paste the following code:

<IfModule mod_expires.c>
    <FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
        ExpiresActive On
        ExpiresDefault "access plus 10 years"
    </FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1
    
    <IfModule mod_expires.c>
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
    </IfModule>

    <IfModule !mod_expires.c>
        RewriteCond %{REQUEST_FILENAME} -f
        RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt))$ smartoptimizer/?$1
    </IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
    FileETag none
</FilesMatch>

3 - Make sure the yourdomain.com/smartoptimizer/cache/ folder has 777 permissions.

4 Enjoy...
Just Getting Started with CS-Cart
CS 2.08 - Optimized for Speed!
--------------------------------

 
  • jegesmaci
  • Senior Member
  • Members
  • Join Date: 05-Oct 09
  • 403 posts

Posted 22 November 2009 - 01:21 PM #12

Are there any side effects for doing this? Sounds too good to be true. Why wouldn't everyone be doing this to speed up their site?

Thanks,

Adam

 

Posted 22 November 2009 - 01:30 PM #13

No side effects on the site I have it on... http://www.overstockavenue.com/

Works like a charm and increased initial load time by 75-80%
Just Getting Started with CS-Cart
CS 2.08 - Optimized for Speed!
--------------------------------

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 22 November 2009 - 04:22 PM #14

No side effects on the site I have it on... http://www.overstockavenue.com/

Works like a charm and increased initial load time by 75-80%



i tried it out on my site ....

but if i do a gzip test at :

http://www.gidnetwor...s/gzip-test.php

it says the page is not compressed .... not sure if it fully works or not ...

 

Posted 22 November 2009 - 04:43 PM #15

@ teksigns -

I get the same "gzip not active" message when using it... but the checker is only looking for the presence of the gzip mod in your files, which its not.

If you use Firefox - grab the YSlow extension, it will show what you really save with using the optimizer.

Look at this for proof... Before compression: 367k, after: 21.3k

Posted Image
Just Getting Started with CS-Cart
CS 2.08 - Optimized for Speed!
--------------------------------

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 22 November 2009 - 05:23 PM #16

ok here is my results :

this is without anything at all ....

Posted Image

this is with gzip like this only ....
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5

Posted Image

this is with smartoptimizer only ....

Posted Image

this is with smartoptimizer and gzip in htaccess like below ....
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5

Posted Image

 
  • brandonvd
  • is Super Awesome
  • Members
  • Join Date: 19-Dec 06
  • 2633 posts

Posted 22 November 2009 - 05:30 PM #17

Huh, it's funny I did this exact same thing last night and it made my whole site go down, but now I did it again and everything works. I guess I must have misstyped something.

Anyways, this does work. For me it didn't make a huge difference, but I thing that is because I have a lot of images on my homepage. But, I will say it does help some.

Brandon

 
  • teksigns
  • Senior Member
  • Members
  • Join Date: 26-Jun 09
  • 181 posts

Posted 22 November 2009 - 05:37 PM #18

i noticed that adding the gzip to the htaccess causes the my account page to break
if your already running the optimizer ...

 

Posted 22 November 2009 - 05:59 PM #19

@ Brandon -

Head over to this speed test page and drop your domain in. What I use it for mostly is to ID large images, large files, etc. You have a few banners that are fairly large in size - and it may help to crunch them down a bit. I am of the thought that every little bit helps! :-)

For anyone else interested in my efforts to get a 400k homepage to load in -4 seconds - I have a post written here. I was able to find several 404's within the stylesheet that also slowed the loading process.

M
Just Getting Started with CS-Cart
CS 2.08 - Optimized for Speed!
--------------------------------

 
  • jobosales
  • Senior Member
  • Members
  • Join Date: 04-Nov 06
  • 3114 posts

Posted 22 November 2009 - 06:04 PM #20

Huh, it's funny I did this exact same thing last night and it made my whole site go down, but now I did it again and everything works. I guess I must have misstyped something.

I am all too familiar with this syndrome which seems to clear up after some sleep. I should try that more often.

Bob
CS-Cart 2.0.14 (testing)