chemapresta Posted September 7, 2011 Share Posted September 7, 2011 How can i enable compresion to get a faster pages, please ? I use PS 1.4 and this is what i have in .htaccess <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" </IfModule> FileETag INode MTime Size <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript </IfModule> thanks. Link to comment Share on other sites More sharing options...
chemapresta Posted September 9, 2011 Author Share Posted September 9, 2011 How can i enable compresion to get a faster pages, please ? I use PS 1.4 and this is what i have in .htaccess <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" </IfModule> FileETag INode MTime Size <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript </IfModule> thanks. Nobody knows ?? Thanks Link to comment Share on other sites More sharing options...
rocky Posted September 25, 2011 Share Posted September 25, 2011 I'm not sure why you are asking how to enable compression, since it seems you have already added the compression code to your .htaccess file. It should be working, unless your host doesn't support GZIP compression, like mine does. You can also enable CSS, JavaScript and HTML compression on the Preferences > Performance tab (enable all but the last one), and make sure you have "Force compile" set to "No" and "Caching" set to "Yes" when you aren't editing TPL files to improve the speed of your website. Link to comment Share on other sites More sharing options...
AITOC Posted March 15, 2012 Share Posted March 15, 2012 Hi everyone, please take a look at http://addons.prestashop.com/en/administration-tools/4633-Performance-Booster.html This module fully caches the pages and, without initializing PrestaShop, provides your visitors with ready output that takes significantly less time to load. Link to comment Share on other sites More sharing options...
ALMAJ Posted February 25, 2014 Share Posted February 25, 2014 (edited) I'm not sure why you are asking how to enable compression, since it seems you have already added the compression code to your .htaccess file. It should be working, unless your host doesn't support GZIP compression, like mine does. You can also enable CSS, JavaScript and HTML compression on the Preferences > Performance tab (enable all but the last one), and make sure you have "Force compile" set to "No" and "Caching" set to "Yes" when you aren't editing TPL files to improve the speed of your website. Hi rocky! How can I enable compression to themes/default/cache? this is what i get from PageSpeed Insights and gtmetrix.com: Compressing the following resources with gzip could reduce their transfer size by 247.8KiB (73% reduction). Compressing http://www.tekcenter...894ca5515689.jscould save 152.2KiB (69% reduction). Compressinghttp://www.tekcenter...b9d80ce_all.css could save 80.7KiB (82% reduction). Compressing http://www.tekcenter...pluginDetect.js could save 14.9KiB (65% reduction). My prestashop version is: 1.5.6.2 (Default theme) my current .htaccess code is this: <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> RewriteEngine on RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule . - [E=REWRITEBASE:/store/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url= [QSA,L] # Images RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p//jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p///jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$1jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$1jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$1jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$6/$1jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$6/$7/$1jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p////$4/$5/$6/$7/$8/$1jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/jpg [L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/jpg [L] # AlphaImageLoader for IE and fancybox RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/ [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^.*$ - [NC,L] RewriteCond %{HTTP_HOST} ^www.tekcenter.pt$ RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/gif "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType text/css "access plus 1 week" ExpiresByType text/javascript "access plus 1 week" ExpiresByType application/javascript "access plus 1 week" ExpiresByType application/x-javascript "access plus 1 week" ExpiresByType image/x-icon "access plus 1 year" </IfModule> FileETag INode MTime Size <IfModule mod_deflate.c> <IfModule mod_filter.c> AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript </IfModule> </IfModule> Best regards. Edited February 25, 2014 by majority (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now