Flux Print Posted December 8, 2010 Share Posted December 8, 2010 It looks my web hosting company runs so many web sites on their server so my front end loads bloody slow. I still don't understand why my tamplate uses 5 individual jquary scripts. So many requests. Does anybody of you guys tried gzip-ing all css and java scripts. Any idea how to do it?Thanks,Peter Link to comment Share on other sites More sharing options...
rocky Posted December 9, 2010 Share Posted December 9, 2010 It sounds like your template needs to be optimised. PrestaShop v1.4 adds code to the .htaccess file to GZIP HTML, CSS and Javascript. It also adds code to cache images, CSS and Javascript. Here's the code it adds: 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" FileETag INode MTime Size AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript Perhaps adding this to the bottom of your .htaccess file will help?PrestaShop v1.4 also has a "Combine, Compress, Cache" option for CSS and Javascript, but that's not easy to add to earlier versions of PrestaShop. Link to comment Share on other sites More sharing options...
fitgura Posted December 10, 2010 Share Posted December 10, 2010 Hi Rocky!could you explain me how is your code works??what is access plus 1 monht/week?I use 1.3.1.1 and I had to fight with my hosting comany to switch on the gzip mod on the server but they did itand I put these code before in htaccess mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* and I test my site in gidnetwork gziptestbut nothing happend, it was not zippedand now I just put your code, and all is works fine with 85,1% compressionbut I don't understand this code so please explain it in a few word please!!!Thanks so mutch anyway....it works fine Link to comment Share on other sites More sharing options...
DATO Posted February 14, 2011 Share Posted February 14, 2011 wow thank you dear rocky.i use 1.3.6 in hosting without gzip. i have added the code what you show. it works great to compression! how we can do the combine cache for css and js file if the version below 1.4 ? Link to comment Share on other sites More sharing options...
rocky Posted February 14, 2011 Share Posted February 14, 2011 You must do it all manually using online tools. I suggest waiting for PrestaShop v1.4 and using the automatic CCC in it. It's much easier. I'm using it on my new PrestaShop v1.4 website, which I'll make live once PrestaShop v1.4 final is released, and it works well. My website runs very fast with all the performance options enabled. Link to comment Share on other sites More sharing options...
DATO Posted February 15, 2011 Share Posted February 15, 2011 it's too hard for me. i try to update 1.3.6 to 1.4 many things lost... Link to comment Share on other sites More sharing options...
curtdonohue Posted April 16, 2011 Share Posted April 16, 2011 DATO,I'm not sure if this will help or not, but I've done a couple of video tutorials (based on NethercottConstructions work) that I think might help you. The first video tutorial is on GZIP and can be found at http://www.prestatraining.com/gzip-compression-browser-caching/.The second tutorial is on PrestaShop v1.4 performance settings and can be found at http://www.prestatraining.com/performance-settings-for-prestashop-version-1-4/. If you are going up upgrade to v1.4, this should be useful to you. Link to comment Share on other sites More sharing options...
Recommended Posts