lokifer Posted January 1, 2013 Share Posted January 1, 2013 Hí there , How can i enable gzip compration in prestashop 1.5 ? Thank in advanced for the help Happy New year to all Link to comment Share on other sites More sharing options...
Dh42 Posted January 1, 2013 Share Posted January 1, 2013 You can enable optimizations with the htacess file. You can further extend them by adding custom file types by editing the file directly too. Link to comment Share on other sites More sharing options...
lokifer Posted January 1, 2013 Author Share Posted January 1, 2013 Thank you, for the replay, Is there a step by stept tutorial of how to do this anywhere ? I' a total nob on how to to do this. Link to comment Share on other sites More sharing options...
hxd Posted January 2, 2013 Share Posted January 2, 2013 (edited) You need to edit the .htaccess file that's in the root PrestaShop directory on your hosting account. You should be able to do that using the control panel of your account. If you don't have an .htaccess file, you need to create one. Again, you should be able to do that from the control panel. When you edit the file you can put in it something like this: <IfModule mod_deflate.c> SetOutputFilter DEFLATE AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml AddOutputFilterByType DEFLATE application/javascript application/x-javascript AddOutputFilterByType DEFLATE application/x-httpd-php </IfModule> Edited January 2, 2013 by hxd (see edit history) Link to comment Share on other sites More sharing options...
lokifer Posted January 3, 2013 Author Share Posted January 3, 2013 Thank you, I see that my already has in the .htaccess file, the folowing <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> But gzip test online tools or google page speed insights, state that i have no compression. What i'm i doing wrong ? Link to comment Share on other sites More sharing options...
Dh42 Posted January 3, 2013 Share Posted January 3, 2013 Sometimes it takes google a while to update it since it caches. You can try using this to see if it works http://www.whatsmyip.org/http-compression-test/ if it doesn't contact your host, mod_deflate is not installed. Link to comment Share on other sites More sharing options...
lokifer Posted January 7, 2013 Author Share Posted January 7, 2013 I've contact my host, mod_deflate was not installed. it is now Thank for all the help Link to comment Share on other sites More sharing options...
lokifer Posted January 7, 2013 Author Share Posted January 7, 2013 BTW your links on the signature, Very hepfull Thanks again 1 Link to comment Share on other sites More sharing options...
Dh42 Posted January 7, 2013 Share Posted January 7, 2013 Great, I am glad I could help. Link to comment Share on other sites More sharing options...
domorodec Posted April 14, 2013 Share Posted April 14, 2013 (edited) Great, I am glad I could help. Hello, I would like to ask you one question regarding this topic.ON http://www.whatsmyip...mpression-test/ - it shows me, that my page is gzipped Original Size: 24.3 KB Compressed Size: 6.59 KB Data Savings: 72.88% BUT on this site - https://developers.g...espeed/insights - it shows me that I should enable compression - Compressing the following resources with gzip could reduce their transfer size by 193.3KiB (71% reduction)......which doesn´t make sence right? One thing- I didn´t make any changes in .htaccess ( this file was already created by PS - but there is nothing similar as you write above only this text (# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^my domain$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again I have Prestashop 1.5.3.1 Could you pls advice me where could be problem? Thank you much. Edited April 14, 2013 by domorodec (see edit history) Link to comment Share on other sites More sharing options...
domorodec Posted April 14, 2013 Share Posted April 14, 2013 Hello, I would like to ask you one question regarding this topic. ON http://www.whatsmyip...mpression-test/ - it shows me, that my page is gzipped Original Size: 24.3 KB Compressed Size: 6.59 KB Data Savings: 72.88% BUT on this site - https://developers.g...espeed/insights - it shows me that I should enable compression - Compressing the following resources with gzip could reduce their transfer size by 193.3KiB (71% reduction)......which doesn´t make sence right? One thing- I didn´t make any changes in .htaccess ( this file was already created by PS - but there is nothing similar as you write above only this text (# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^my domain$ RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again I have Prestashop 1.5.3.1 Could you pls advice me where could be problem? Thank you much. One more thing - probably this issues should be resolved with new ver. I am already using right? Cause another test on http://port80software.com/support/p80tools says: File Size Comparison (in bytes): Original size: 24886 bytes Compressed size: 6746 bytes Savings in bytes: 18140 bytes Percentage saved by compression: 73.0% Transfer speed improvement: 3.6 X Well..... Link to comment Share on other sites More sharing options...
domorodec Posted April 14, 2013 Share Posted April 14, 2013 RESOLVED: thanks to this link. http://www.prestashop.com/blog/en/10-best-tips-to-speed-up-your-prestashop-store-3/ For others who may have similar problems...... get newer Prestashop and set up all in this article and never has to deal with any .htaccess file anymore. Thx.M. Link to comment Share on other sites More sharing options...
yannro Posted November 25, 2013 Share Posted November 25, 2013 Thank you for your help! working for me with 1.5.6.0 Link to comment Share on other sites More sharing options...
ALMAJ Posted February 25, 2014 Share Posted February 25, 2014 (edited) 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) Best regards. Edited February 25, 2014 by majority (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts