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   - - - - -

 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 12 December 2009 - 07:48 AM #41

Hello Moka,

It breaks the javascript on my homepage...:(


Try to do my advice for your javascript scripts:

http://forum.cs-cart...66487#post66487


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • moka
  • Senior Member
  • Members
  • Join Date: 09-Feb 08
  • 634 posts

Posted 12 December 2009 - 08:12 AM #42

I managed to put an exception on the js file in my htaccess, but for some reason when I install add the original smartoptimizer code or edited code in the htaccess file, nothing can find my site (netrenderer, browsershots, pingdom, etc.).

I can see my site and I can also see the effects if I add in the exception line and we are still getting orders. Cache file in the smartoptimizer has been cleared.

any ideas why this is?

 
  • JNizhnik
  • Member
  • Members
  • Join Date: 16-Feb 10
  • 31 posts

Posted 19 February 2010 - 10:13 PM #43

I just installed smartoptimizer and had some comments:

1. When I put this in my cs-cart directory public_html/store/smartoptimizer and edited the .htaccess file in public_html/store it broke my site. None of the style sheets would load, etc.

2. I moved my smartoptimizer folder to the root public_html and edited the .htaccess file there and the site loaded correctlu

3. It seems to me that the site is running much faster, but the smartoptizmer/cache folder is empty (folder has the 777 permissions). How do I know if it is actually working or if I'm just seeing what I want.

4. Should I notice the decrease in html calls, size, etc immediately on the analyzer? Is there a way to check if the compression is actually happening.?

Like I said, the site def FEELS faster.

Thanks,

Joe

 
  • Struck
  • Teetering on Genious
  • Members
  • Join Date: 07-Mar 09
  • 2502 posts

Posted 19 February 2010 - 10:30 PM #44

The smartoptimizer folder should be in the same directory as your CS-Cart store files.

3. It seems to me that the site is running much faster, but the smartoptizmer/cache folder is empty (folder has the 777 permissions). How do I know if it is actually working or if I'm just seeing what I want


If you have this setup properly, then as various pages of your site are visited, they should be cached and added immediately to your smartoptimizer/cache folder
Cooking with Gas on Version 4.1.2 (But proceeding with caution....)

 
  • Struck
  • Teetering on Genious
  • Members
  • Join Date: 07-Mar 09
  • 2502 posts

Posted 19 February 2010 - 10:35 PM #45

Also, try adding this to the very top of your .htaccess file in your CS-cart folder:

<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>

Cooking with Gas on Version 4.1.2 (But proceeding with caution....)

 
  • JNizhnik
  • Member
  • Members
  • Join Date: 16-Feb 10
  • 31 posts

Posted 20 February 2010 - 12:46 AM #46

Struck, thanks for the post.

Clearly I don't have it setup correctly, The code above matches what I have placed in my .htaccess file. I have tried placin the code:

-public_html/.htaccess Beginning of the file
-public_html/.htaccess End of the file
(moved the smartoptimizer folder to public_html/store at this point, per your suggestion)
-Store/.htaccess Beginning of the file
-Store/.htaccess End of the file
-Store/.htaccess Middle of the file right after Directory Index command

None of these reduced my score in YSlow or added anything to the cache folder(despite a lot of browsing). Furthermore, all three scenarios where the file was in my store directory broke IE. I was able to explore freely in firefox with no problem, but IE loads with no style sheet whatsoever.

The installation instructions are quite simple, I have no clue why I am failing here.

Thanks,
Joe

 
  • Struck
  • Teetering on Genious
  • Members
  • Join Date: 07-Mar 09
  • 2502 posts

Posted 20 February 2010 - 12:56 AM #47

What'd you do? :D

Yeah, you should see your smartoptimizer/cache folder start to fill up immediately.

Interesting that you say it displays fine in FF but not in IE.....

Maybe try putting everything back to how I explained, then turn off the IE page cache feature.

Clear the contents of your var/cache folder in your cs-cart install, then give it another try. ;)

Also, you may want to triple check your permissions setup for smartoptimizer, I have ours set as follows:
All folders within smartoptimizer = 755
All files within smartoptimizer = 644
Cooking with Gas on Version 4.1.2 (But proceeding with caution....)

 
  • JNizhnik
  • Member
  • Members
  • Join Date: 16-Feb 10
  • 31 posts

Posted 20 February 2010 - 01:33 AM #48

Boom goes the dynamite! That's a wrap, haha. Worked like a charm.

Not that I'm complaining, but no clue why it's working. I had been hitting the IE developer mode, clear cache button before refreshing anyway, but it wasn't until I turned off IE caching did things in the smartoptimizer cache folder start to appear.

IE is now blazing fast. I turned off caching in FF too, and I am very surprisd that it's actually quite slower than IE. I've turned caching back on in IE and it has continued to work without breaking the CSS like before.

My YSlow statistics are now at only a handful of requests like the other users on this page (instead of the 50+) so it's definitely working.

Anyway, thanks a ton man.
-Joe

 
  • Struck
  • Teetering on Genious
  • Members
  • Join Date: 07-Mar 09
  • 2502 posts

Posted 20 February 2010 - 01:36 AM #49

Awesome, enjoy!
Cooking with Gas on Version 4.1.2 (But proceeding with caution....)

 
  • btrials
  • Senior Member
  • Members
  • Join Date: 03-Jul 07
  • 195 posts

Posted 16 November 2010 - 03:08 PM #50

Awesome stuff Struck, #44 & #45 just made my page speed on GTmetrix go from C to A! :) Tweaking more...

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2392 posts

Posted 05 December 2010 - 12:56 PM #51

I'm wondering, with CS-cart 2.12, would installing smartoptimizer still make such a difference?

When life hands you lemons, bring on the Tequila baby!


 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 05 December 2010 - 01:24 PM #52

Hello Flow,

I'm wondering, with CS-cart 2.12, would installing smartoptimizer still make such a difference?


For sure, Yes!

In fact, every website needs SmartOptimizer.


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2392 posts

Posted 05 December 2010 - 01:53 PM #53

Wow that was easy! Installed it in 1 minute and runs like a charm. Site is so much faster I can hardly believe it!

THANKS!!!! :D :D :D

When life hands you lemons, bring on the Tequila baby!


 
  • tletourneau
  • Senior Member
  • Members
  • Join Date: 13-Apr 07
  • 179 posts

Posted 05 December 2010 - 05:19 PM #54

It worked well for my site, once I figured it out. Load times went from 7.7 to 4.3.

Thanks for the tip!
Thanks,
Tom
Version - 3.0.4
Hosting - RangeHosting.us

 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 05 December 2010 - 07:38 PM #55

And now, Ladies and Gentlemen, here is Step 1:

Speed Up Your CS-Cart eCommerce Website - Gzip - Step 1


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • usnswcc
  • Junior Member
  • Members
  • Join Date: 20-Feb 11
  • 13 posts

Posted 17 July 2011 - 03:14 AM #56

@ 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...


I first pasted this before the DirectoryIndex index.html index.php in htaccess and it broke my checkout style. So I added it at the very bottom and now it worked! Site went from 77% (74% YSLOW) to 89% (81% YSLOW) !

 
  • usnswcc
  • Junior Member
  • Members
  • Join Date: 20-Feb 11
  • 13 posts

Posted 17 July 2011 - 10:59 PM #57

I first pasted this before the DirectoryIndex index.html index.php in htaccess and it broke my checkout style. So I added it at the very bottom and now it worked! Site went from 77% (74% YSLOW) to 89% (81% YSLOW) !


Nevermind it actually breaks my entire site... still trying to figure out where to put the code in htaccess or why it breaks my site completely. Images and text are everywhere, design goes away..

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 18 September 2011 - 06:23 PM #58

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.


I have followed the instructions here but am getting now getting a 500 error
after installing Smart Optimizer. Anyone have any ideas how I might fix this?
CS-Cart was working fine before Smart optimizer but after editing the .htaccess
file I get a 500 error. The same error occurs when I navigate directly
to the smart optimizer folder as well.

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

Posted 18 September 2011 - 06:36 PM #59

Inside the SO folder there is a .htaccess file. Most of us have had to remove this file to get SO to work. I'd probably start there. If it still doesn't work than I'd make sure your main .htaccess file is correct.

Hope that helps,

Brandon

 
  • solesurvivor
  • Senior Member
  • Members
  • Join Date: 05-Aug 11
  • 745 posts

Posted 18 September 2011 - 07:00 PM #60

Inside the SO folder there is a .htaccess file. Most of us have had to remove this file to get SO to work. I'd probably start there. If it still doesn't work than I'd make sure your main .htaccess file is correct.

Hope that helps,

Brandon


Brandon,

Thanks for your reply. I did remove .htaccess in the so folder. I also as install instructions
state added the below to my Cs-Cart .htaccess file. But still get the 500 error. Any other ideas?

php_flag zlib.output_compression Off
php_flag output_buffering Off
php_value output_handler NULL

UPDATE: I replaced everything in my .htaccess file and added the code below which i found in another post on here somewhere. This fixed my issues and SO appears to be working great now.

#php_flag zlib.output_compression Off
#php_flag output_buffering Off
#php_value output_handler NULL

DirectoryIndex index.html index.php

<IfModule mod_deflate.c>

<FilesMatch "\.(php|html)$">

SetOutputFilter DEFLATE

</FilesMatch>

</IfModule>

<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>


<IfModule mod_rewrite.c>

RewriteEngine on

# Some hostings require RewriteBase to be uncommented

# Example:

# Your store url is http://www.yourcompany.com/store/cart

# So "RewriteBase" should be:

# RewriteBase /store/cart 

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php?sef_rewrite=1 [L,QSA]


RewriteCond %{REQUEST_FILENAME} .*\/catalog\/.*

RewriteCond %{REQUEST_FILENAME} -d

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteRule . index.php?sef_rewrite=1 [L,QSA]


</IfModule>

Edited by solesurvivor, 18 September 2011 - 07:34 PM.