2

Web サーバーが圧縮されたコンテンツを提供しているかどうか、および遠い将来の期限切れヘッダーを確認するにはどうすればよいですか? .htaccessYSlow は、ファイルに次の項目を追加したにもかかわらず、プレーン テキストで送信されているリソースがあり、「遠い将来」の期限切れヘッダーがないことをまだ伝えています。

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A0
    ExpiresByType image/gif A2592000
    ExpiresByType image/png A2592000
    ExpiresByType image/jpg A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/ico A2592000
    ExpiresByType image/x-icon A2592000
    ExpiresByType text/css A2592000
    ExpiresByType text/javascript A2592000
</IfModule>

Picture.png

期限切れヘッダーが必要であると言われているものの 1 つは favicon.ico ファイルであり、Firebug にリストされているヘッダーは次のとおりです。

HTTP/1.1 200 OK
Date: Sun, 18 Sep 2011 00:50:03 GMT
Server: Apache
Last-Modified: Tue, 21 Dec 2010 21:47:19 GMT
Etag: "f8233-47e-497f294aba7c0"
Accept-Ranges: bytes
Content-Length: 1150
Cache-Control: max-age=0
Expires: Sun, 18 Sep 2011 00:50:03 GMT
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: image/x-icon

gzip する必要があると言われているリソースの 1 つは、メインの index.php ファイルです。このファイルは、独自のヘッダーを送信していません。応答ヘッダーは次のとおりです。

HTTP/1.1 200 OK
Date: Sun, 18 Sep 2011 00:49:33 GMT
Server: Apache
X-Powered-By: PHP/5.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: PHPSESSID=754163feea6fab8a8d6d7f0ef6ed3c29; path=/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

mod_deflateこれはApache 2サーバーであるため、使用しようとしています。

何が間違っているのか、何を確認できるのか、さらにテストするにはどうすればよいのか?

また、「ETag が正しく構成されていないコンポーネントが 17 個あります」というメッセージも表示されます。これが何を意味するのかもわかりません。eタグはヘッダーにあり、私には問題ないように見えます.

4

1 に答える 1

1

mod_deflate については、このテストをお勧めします。

于 2011-09-18T01:01:00.710 に答える