Dec 22, 2015
PageSpeed ??Insights
0
On this page
This rule is triggered when PageSpeed Insights detects that a compressed resource on a Web page is not provided with HTTP compression.
Many network servers can compress files into a file by calling a third-party module or using a built-in programgzipFormat, and then send the compressed file for download. This can save you some time when downloading the resources needed to render the website.您應(yīng)在自己的網(wǎng)絡(luò)服務(wù)器上啟用壓縮功能。以下這些參考展示了某些熱門網(wǎng)絡(luò)服務(wù)器上所啟用的壓縮功能:
- Apache: Adoptingmod_deflate
- Nginx:采用HttpGzipModule
- IIS:Configuring HTTP compression
?
- PageSpeed Insights reports that many static content files need to be compressed into gzip format, but I have configured my network server to provide these files in gzip compressed format. Why can't PageSpeed Insights recognize these compressed files?
- 在將文件下載到客戶端計算機時,代理服務(wù)器和防病毒軟件可以停用壓縮功能。由于PageSpeed Insights是根據(jù)實際返回到客戶端的標(biāo)頭來報告結(jié)果,因此,如果您要在使用此類防病毒軟件或在后面放置中級代理服務(wù)器的客戶端計算機上運行分析(許多代理服務(wù)器是透明的,您甚至可能意識不到代理服務(wù)器介入您的客戶端和網(wǎng)絡(luò)服務(wù)器),則可能會導(dǎo)致出現(xiàn)此問題。
要確定代理服務(wù)器是否為導(dǎo)致此問題的原因,您可以使用PageSpeed Insights Chrome ExtensionsTo check the header:- Run PageSpeed on the related web page.
- 點擊顯示資源標(biāo)簽。
- Expand the URL of the resource marked uncompressed. The system displays the header displayed with the resource. If you see a file named
Via、Forwarded或Proxy-ConnectionIndicates that the proxy server has provided the resource.
Except as other written, the content of this page is licensed under theCreative Commons Attribution 3.0 License, and code samples are licensed under the?Apache 2.0 License. For details, see our?Site Policies.
Articles
PageSpeed ??Insights
Back to List
