Jump to content

[SOLVED] Gzip "CSS" and "JS" is ok, but gzip "php" is not ok


Recommended Posts

I have PS 1.5.4.0. Compression is turned on and works for css and js for, but does not work for the source code of the page. This means that compression is not working for php.

 

When I look at the results of some instruments (Webpagetest or PageSpeedInsight), compression for php is not, it is seen in the attached pictures.
Can anyone advise me?

post-571702-0-39472200-1382424349_thumb.png

post-571702-0-25006600-1382424350_thumb.png

post-571702-0-29573400-1382424351_thumb.png

Edited by vekia (see edit history)
Link to comment
Share on other sites

Hello,

What helped me when facing the same issue was adding this line of code:

if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();

in the beginning of 'index.php' file, the one in the main PrestaShop directory, just before the line:

require(dirname(__FILE__).'/config/config.inc.php'); 
Edited by itdes (see edit history)
  • Like 2
Link to comment
Share on other sites

×
×
  • Create New...