Yslow does not recognize my gzip

my site happily gzipped according to:

http://www.gidnetwork.com/tools/gzip-test.php

However, when I run it through Yslow, I get F for Gzip and lists all of my scripts as components that they have not fastened.

Any ideas?

+3
source share
2 answers

Look in the Firebug headers and make sure the browser sends

Accept-Encoding     gzip,deflate 

in the request header and what

Content-Encoding    gzip

sent by the server in the response header (indicates that gzipping has been applied).

+6
source

If you used the method on linked pages for gzip your site, this will not affect the scripts, because they do not run through PHP. You need to either:

1) - (apache2 mod_deflate)

2) .js php:

<?php ob_start('ob_gzhandler'); echo file_get_contents('whatever.js'); ?>
0

Source: https://habr.com/ru/post/1705895/


All Articles