mojweb Posted December 10, 2014 Share Posted December 10, 2014 Using presta 1.6.0.9 and smarty cache. Presta is generating htaccess file with expire dates for files like: ExpiresActive On ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType text/css "access plus 1 month" ExpiresByType application/pdf "access plus 1 month" ... But missing jpg extension. That is reason for slow performance in Chrome browser. If i manualy add that line for jpg, is overwriten at next htaccess update. I think that is a bug in PS. So solution for that? Which file is responsible for write this expire dates in htaccess? Is it posible to protect this line for being overwriten? Link to comment Share on other sites More sharing options...
Dh42 Posted December 10, 2014 Share Posted December 10, 2014 You can add it directly to the classes/tools.php around line 2227, https://github.com/PrestaShop/PrestaShop/blob/1.6/classes/Tools.php then it would be there during every regeneration. 1 Link to comment Share on other sites More sharing options...
the.rampage.rado Posted December 10, 2014 Share Posted December 10, 2014 I think that ExpiresByType image/jpeg "access plus 1 year" Also handles .jpg But I'm experiencing the same problems - some (only some) .jpg are not handled by the same configuration. Some are, some are not. File permissions are same. Think it could be some sort of server issue but my hosting can't figure it out. Link to comment Share on other sites More sharing options...
mojweb Posted December 10, 2014 Author Share Posted December 10, 2014 Great. Its working. I added to tools.php https://github.com/PrestaShop/PrestaShop/commit/150a98a1cea61c9d874ee2b4783ade101ae9caa5 font files gzip management line to and manage to get speed under 2 sec. Link to comment Share on other sites More sharing options...
mojweb Posted December 10, 2014 Author Share Posted December 10, 2014 I think that ExpiresByType image/jpeg "access plus 1 year" Also handles .jpg But I'm experiencing the same problems - some (only some) .jpg are not handled by the same configuration. Some are, some are not. File permissions are same. Think it could be some sort of server issue but my hosting can't figure it out. It should, but problem is in Chrome browser. Adding jpg solves it. Link to comment Share on other sites More sharing options...
Dh42 Posted December 10, 2014 Share Posted December 10, 2014 There was a bug a while back in the home slider that it didn't use a file extension, is would be like 34hjkg423hjpg and those would not compress because there was no file extension, they were in a img tag so they were still interpreted as an image. Link to comment Share on other sites More sharing options...
Recommended Posts