rocky Posted June 7, 2010 Share Posted June 7, 2010 I have now finished the Performance Tips page on my website. Any feedback on the page or any ideas for more performance tips is welcome. 1 Link to comment Share on other sites More sharing options...
thehandlestudio Posted June 7, 2010 Share Posted June 7, 2010 Nice work Rocky, I thought I had done the gzip right in my cpanel until I read your tips, I have noticed a big difference now its right.Thanks,Mark. Link to comment Share on other sites More sharing options...
bobbob Posted June 7, 2010 Share Posted June 7, 2010 Cheers Rocky. Your suggestions make a huge difference! I would strongly urge everyone to implement Rocky's advice. My site now loads at least 2 seconds quicker! Link to comment Share on other sites More sharing options...
SpyrosT Posted June 8, 2010 Share Posted June 8, 2010 Great work Rocky!My vote for sticky. Link to comment Share on other sites More sharing options...
airbag Posted June 13, 2010 Share Posted June 13, 2010 Yes good work Rocky.I got a 70% compression on my product page loading which has really sped things up.Dunno tho about that expiry date on the ETags, it would be good to find out more to see if this needs adjusting or just leaving as is. Link to comment Share on other sites More sharing options...
Sultan Posted June 13, 2010 Share Posted June 13, 2010 Excellent,,,This thread should be sticky...Thanks for sharing it with us... Link to comment Share on other sites More sharing options...
Kaihaku Posted June 14, 2010 Share Posted June 14, 2010 Great list of tips, thanks for sharing. Link to comment Share on other sites More sharing options...
mytheory. Posted June 22, 2010 Share Posted June 22, 2010 Great list of performance tips! I've applied as much as I could and have seen decent results!I have some problems with you section on removing ETags... you said to place those 3 lines in the .htaccess, so I copied and pasted it at the end of my .htaccess, but kept getting 500 Internal Server Error. I've had to omit this step, but would like to get it resolved. My site could use all the help it can get.Thanks! Link to comment Share on other sites More sharing options...
rocky Posted June 22, 2010 Author Share Posted June 22, 2010 Maybe your server doesn't support it. Try putting it at the top of the .htaccess file instead of the bottom. Link to comment Share on other sites More sharing options...
alchemisto Posted August 7, 2010 Share Posted August 7, 2010 Thank you as always Rocky for your great tips. Anyway, I've turned the var $caching to be on, but after a few days it seems that my cache directory is still empty. Is this normal? Or there is something wrong? Please give me some advice. Link to comment Share on other sites More sharing options...
rocky Posted August 7, 2010 Author Share Posted August 7, 2010 Something must be wrong. Once you've enabled that option and refreshed your page, it should be cached straight away in smarty/cache for faster loading. I'm not sure why it wouldn't do it. Did you also change 'compile_check' and 'force_compile' to false? Link to comment Share on other sites More sharing options...
alchemisto Posted August 7, 2010 Share Posted August 7, 2010 I did it exactly as is in your tips. var $compile_check = false; var $force_compile = false; var $caching = 1; var $cache_dir = 'cache'; var $cache_modified_check = true;I've also set chmod 777 for cache directory.Or is it because of the Litespeed server? Link to comment Share on other sites More sharing options...
rocky Posted August 7, 2010 Author Share Posted August 7, 2010 I'm not familiar with Litespeed, but if it is causing you problems in other areas, it may also be causing a problem here. Link to comment Share on other sites More sharing options...
alchemisto Posted August 7, 2010 Share Posted August 7, 2010 Yay.. I got the answer Rocky.It's in the config/smarty.config.inc.phpI didn't think it's that simple Link to comment Share on other sites More sharing options...
alchemisto Posted August 10, 2010 Share Posted August 10, 2010 Hi all, I don't know this only happened to me or someone else too.When I turned the cache on, there was a malfunction. The whole website turned into a static-html-like pages. It really broke down my website.Any idea about this issue? Link to comment Share on other sites More sharing options...
rocky Posted August 10, 2010 Author Share Posted August 10, 2010 I had a similar problem with a website I did recently. It seems changing config/smarty.config.inc.php only is not enough for caching to work. I have to change tools/smarty/Smarty.class.php for the caching to work. My website has it enabled and seems to be working fine as far as I can tell. Link to comment Share on other sites More sharing options...
alchemisto Posted August 10, 2010 Share Posted August 10, 2010 Actually I've changed both of them, the config/smarty.config.inc.php and tools/smarty/Smarty.class.php. The caching process works fine. But the result is my website had a malfunction. There will be impossible to add products into cart, to update the cart, to logout, etc. I really confused with this caching. Link to comment Share on other sites More sharing options...
rocky Posted August 10, 2010 Author Share Posted August 10, 2010 I've never encountered such problems. Perhaps it is the way your server is configured. In that case, you'll have to disable caching and try the other performance tips instead. Link to comment Share on other sites More sharing options...
alchemisto Posted August 20, 2010 Share Posted August 20, 2010 Hi rocky, after I tested the caching of prestashop on several different servers, which is apache, nginx, litespeed and XAMPP (localhost), I found that there is nearly impossible to turn the cache on for prestashop.And just now I read this thread http://www.prestashop.com/forums/viewthread/43629/general_discussion/solving_cache_problems_dot_I think he's right that prestashop doesn’t pass the ID to the smarty cache because that's what exactly happened to my site.He gave some clue to overcome those ID issue, but I don't think that it's ready for production. I hope you have some idea about this issue because optimizing the smarty was very important to save my sites from being suspended by the hosting provider due to server load issue.Thanks. Link to comment Share on other sites More sharing options...
rocky Posted September 30, 2010 Author Share Posted September 30, 2010 It looks like these tips won't have to be done manually in PrestaShop v1.4. I've tried out the latest version of PrestaShop on SVN and I see many exciting changes including a new Performance tab. Here's a screenshot of the tab. Link to comment Share on other sites More sharing options...
Masternet Posted January 30, 2011 Share Posted January 30, 2011 Hi Rocky,I have this problem toowww.marketmataro.com/shopIf I enable cache with this line in .htaccess: Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT" Then my shop has many errors:I can't close sessionsMany errors with the four beginners categoriesAnd many othersThe only way to resolve this, is to change the Expires time to 2010, but then my shop is slowAny solution? Link to comment Share on other sites More sharing options...
rocky Posted January 30, 2011 Author Share Posted January 30, 2011 PrestaShop v1.4 adds the following optimisation code. Perhaps it will help: 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 Link to comment Share on other sites More sharing options...
Masternet Posted January 30, 2011 Share Posted January 30, 2011 Must I append this code to .htaccess? Link to comment Share on other sites More sharing options...
rocky Posted January 30, 2011 Author Share Posted January 30, 2011 @MasternetYes, add that code to the bottom of your .htaccess file.@finlanderWhat PHP version are you using? I had a client who had problems with their page not refreshing. They downgraded from PHP 5.3.2 to PHP 5.2.16, then it started working perfectly, so it might be an issue with PHP 5.3. Link to comment Share on other sites More sharing options...
Masternet Posted January 31, 2011 Share Posted January 31, 2011 @MasternetYes, add that code to the bottom of your .htaccess file. Okay, so I put this code just below these lines? Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT" Header unset ETag FileETag None I have php version 5.2.13, must I upgrade to 5.2.16?Thanks Link to comment Share on other sites More sharing options...
rocky Posted January 31, 2011 Author Share Posted January 31, 2011 No need to upgrade. Delete those lines and put the new lines at the bottom. Link to comment Share on other sites More sharing options...
thehandlestudio Posted January 31, 2011 Share Posted January 31, 2011 Which versions of php don't work well with PS? Link to comment Share on other sites More sharing options...
Masternet Posted January 31, 2011 Share Posted January 31, 2011 Hello Rocky,I have the same problem with this code. Link to comment Share on other sites More sharing options...
rocky Posted March 19, 2011 Author Share Posted March 19, 2011 I have now updated my Performance Tips for PrestaShop v1.4. Using these tips, I've managed to get a Google PageSpeed score of 92/100 on my website. I'm still trying to get the promised 98 by PrestaShop. I can't seem to get rid of the cookies being passed along with static content, even after setting up a separate static subdomain for the content. Also, my server doesn't support GZIP compression, so that's reducing my score a little. Link to comment Share on other sites More sharing options...
Paul C Posted March 19, 2011 Share Posted March 19, 2011 If you're using subdomains of the domain your shop is on to serve the static content, then you can't get rid of cookies as the shop cookie is set to .example.com - so applies to all subdomains, not just www.Paul Link to comment Share on other sites More sharing options...
rocky Posted March 20, 2011 Author Share Posted March 20, 2011 @angoraThat code is already there in the Enable GZIP Compression and Browser Caching section.@PaulThanks Paul. I thought the cookie was set only to the subdomains entered on the Tools > Subdomains tab. There's a foreach loop in the getDomain() function of classes/Cookie.php that I thought did this. I just tested the output and it returned nethercottconstructions.com, so it seems to have ignored the www subdomain on the Tools > Subdomains tab. Is this a bug I should report? I've only got one domain, so if I can't use a subdomain, then I can't serve static content without cookies. Link to comment Share on other sites More sharing options...
Paul C Posted March 20, 2011 Share Posted March 20, 2011 Rocky,I've submitted selecting the cookie domain as a feature request for this reason. I had a quick look at the code you're talking about too because I though the same as you, but I can't work out what it's meant to achieve.... Apparently the current behavior isn't a bug (I tried and it got cancelled), but looking at that code I'm not so sure!The other issue I had was that my static subdomains aren't covered by the ssl certificate, so when on an ssl page I got security warnings. I fixed that by ignoring the static domains when serving content on an https page.Paul Link to comment Share on other sites More sharing options...
skyhorse Posted May 3, 2011 Share Posted May 3, 2011 using 1.3.1.1, I simply added a new dummy subdomain in the tools -> subdomains area and deleted the www subdomain. This makes prestashop cookie code believe www.domain.com is the domain and not domain.com , hence it puts the cookie on www.domain.comremember to enforce requests coming in using the non-www version to redirect to the www version (in .htaccess for example)I also had to change the google analytics code to force the domain in the request, because it was also setting it to domain.com, you can do this by adding for example _gaq.push(['_setDomainName', 'www.domain.com']); (for async version) before the trackPageView line. Link to comment Share on other sites More sharing options...
epicureanfoods.com Posted May 4, 2011 Share Posted May 4, 2011 Hi RockyI hope all is well.Have you changed these performance tips with 1.4?We are going to do a large promotion in a few weeks that we figure (with the performance we are getting now) will crash our website. It will be a one-time thing though and if it's successful, we'll definitely repeat.Based on our current calculations we figure we'll need 5-10 times the speed we are getting now.Any suggestions?Thank youPhyllis Link to comment Share on other sites More sharing options...
rocky Posted May 4, 2011 Author Share Posted May 4, 2011 Yes, the performance tips on my website have been updated for PrestaShop v1.4. Link to comment Share on other sites More sharing options...
epicureanfoods.com Posted May 5, 2011 Share Posted May 5, 2011 Thanks Rocky,We are going to do a large promotion in a few weeks that we figure (with the performance we are getting now) will crash our website. It will be a one-time thing though and if it’s successful, we’ll definitely repeat.Based on our current calculations we figure we’ll need 5-10 times the speed we are getting now.Any other suggestions?Thank youPhyllis Link to comment Share on other sites More sharing options...
rocky Posted May 6, 2011 Author Share Posted May 6, 2011 Have you tried the advice on my website to set "Force compile" to "No" and "Cache" to "Yes" and enable the first four CCC options on the Preferences > Performance tab? You can also use Google PageSpeed in Firefox to download optimised images and use SpriteMe to automatically generate sprites. Another thing you can do is set up a subdomain called "static" using your cPanel, then enter static.yourwebsite.com as a media server. Also, if you are using modules from an earlier version of PrestaShop, you should modify the hookHeader function so that all the JS and CSS are included in the CCC instead of separately. Link to comment Share on other sites More sharing options...
Masternet Posted February 7, 2012 Share Posted February 7, 2012 Hello, I'm improving my site with your recomendations and prestatraining videos. I think I have all Ok, but runnig page speed I have a score of 72 because I have to leverage browser caching but I don't know why. Can you help me? http://www.marketmataro.com/shop Link to comment Share on other sites More sharing options...
Recommended Posts