當(dāng)PageSpeed Insights檢測到網(wǎng)頁上的壓縮資源未與HTTP壓縮一同提供時(shí),就會觸發(fā)此規(guī)則。
許多網(wǎng)絡(luò)服務(wù)器可以通過調(diào)用第三方模塊或使用內(nèi)置程序?qū)⑽募嚎s為gzip
格式,然后再發(fā)送該壓縮文件以供下載。這樣可以在下載呈現(xiàn)網(wǎng)站所需的資源時(shí),為您節(jié)省一些時(shí)間。
您應(yīng)在自己的網(wǎng)絡(luò)服務(wù)器上啟用壓縮功能。以下這些參考展示了某些熱門網(wǎng)絡(luò)服務(wù)器上所啟用的壓縮功能:
Via
、Forwarded
或Proxy-Connection
的標(biāo)頭,則表明代理服務(wù)器已提供該資源。Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the Apache 2.0 License. For details, see our Site Policies.