to2bebe & Kids Posted July 2, 2012 Share Posted July 2, 2012 Hello ps users, Doing a webpage speedtest I noticed the I have a lot of css files (19) wich are not being compressed. I found out here is no cache file in the theme I bought but now the question is how /wich and where exactly to to create a cache file so the template can be compressed ? this cache file can also combine the javascript files ? because also here a have 9 files to compress the ps settings of performace are ok Thank you in advance, david www.to2bebe.com Link to comment Share on other sites More sharing options...
phrasespot Posted July 4, 2012 Share Posted July 4, 2012 If your theme is compatible with PS 1.4 then use CCC. Otherwise pretty tricky, lots of modification required. Easier to get a theme compatible with 1.4 1 Link to comment Share on other sites More sharing options...
to2bebe & Kids Posted July 6, 2012 Author Share Posted July 6, 2012 hello phrasespot, Thanks for your reply, I have a theme compatible with PS1,4+ and created an empty cache file in the theme .... Now checking the website it reduced the the ccc and js files from 28 to 6... The following publicly cacheable, compressible resources should have a Vary: Accept-Encoding" header: http://www.to2bebe.c...css/globals.css http://www.to2bebe.c...7e6d3bce7fa7.js http://www.to2bebe.c...b251ca5_all.css http://www.to2bebe.c...css/globals.css http://www.to2bebe.c...s/cufon-font.js http://www.to2bebe.c...js/cufon-yui.js Vary: Accept-Encoding" header ??? I am not sure where to look excactly ( i am not expert ) and because i am facing some problems with gzip i get confused about this topic... Could it be a setting in the thaccess file ?? regards, david www.to2bebe.com htacces file.txt Link to comment Share on other sites More sharing options...
phrasespot Posted July 6, 2012 Share Posted July 6, 2012 Don't worry about it unless your server is behind a cache proxy you own. Browsers will send Accept-Encoding header and will be served gzip if your server is gzipping responses. Automated optimization scans must cater for very general cases so they throw at you everything written in the book. Link to comment Share on other sites More sharing options...
to2bebe & Kids Posted July 7, 2012 Author Share Posted July 7, 2012 hello phrasespot , many thanks for your reply ! I am afraid about this gzip topic i am facing some problems : I contacted my host before and he informed me to add in css scripts at the start : <?php ob_start("ob_gzhandler");?> and at the and <?php ob_flush();?>.... in the globals.css of my theme (for example ) but without any result. (see webpagetestesults) My host has apache 2.2.19 could it be a misconfiguration in the htacess.file ? I have been searching the forums for solution for weeks but without any result... you have any idea where to start looking ? regards , david htaccess 7 july.txt Link to comment Share on other sites More sharing options...
phrasespot Posted July 7, 2012 Share Posted July 7, 2012 (edited) You do not need to make any changes to the core files. That is what the optimizations option in generate .htaccess page of PrestaShop. It will add the mod_deflate stanza to the .htaccess and assuming mod_deflate is added to Apache, files specified in that stanza will be served gzipped if the client is able to handle gzipped content. In your current .htaccess you both have mod_gzip and mod_deflate stanzas. One or the other is enough (depending on which one is enabled on the server and having both will cause problems if both are). I contacted my host before and he informed me to add in css scripts at the start : <?php ob_start("ob_gzhandler");?> and at the and <?php ob_flush();?>.... in the globals.css of my theme (for example ) but without any result. Really? First of all it is nothing to do with CSS, it is PHP code they are asking to you to add to a CSS file. It cannot be added to global.css. Next, even if they asked you to add it to PHP files, (every single one of dozens?) this is an unreasonable solution to say the least. You are not expected to know how to edit a PHP file, you need to know PrestaShop architecture well to decide where to add them and even if you do, it will create maintenance headaches if you ever want to upgrade. In addition, it is server's (in your case Apache) job to compress content before serving, not PrestaShop's. If you were to compress all content, cllients who cannot negotiate gzipped content will not be able to communicate with the server. So your content is prepared uncompressed by PHP and server serves compressed or otherwise depending on client capability. you have any idea where to start looking ? Ask your host to make mod_deflate available (that will solve your Vary header problem too), and consider changing hosts if they do not. If they asked you to add that piece of code to global.css I would change to a different hosting company anyway. Edited July 7, 2012 by phrasespot (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