當(dāng)PageSpeed Insights檢測(cè)到您的某個(gè)資源可通過縮減操作來減小其大小時(shí),就會(huì)觸發(fā)此規(guī)則。
??? ??? ??? ?? ???? ???? ???? ?? ?????(?: ???? ??, ? ?? ? ????). HTML, CSS ? JavaScript? ???? ????, ?? ?? ? ?? ??? ?????. CSS ? JavaScript? ?? ???? ?? ????? HTML? ?????? ?? ?? ??? ???? ?? ??? ? ?? ? ????.
HTML, CSS ? JavaScript? ??? ??? ???.
HTML ??? ????PageSpeed Insights Chrome擴(kuò)展功能來生成優(yōu)化版HTML代碼。對(duì)HTML頁面進(jìn)行分析,然后瀏覽“縮減HTML的大小”規(guī)則。點(diǎn)擊“查看經(jīng)過優(yōu)化的內(nèi)容”,以獲取經(jīng)過優(yōu)化的HTML代碼。
CSS? ??? ????YUI Compressor和cssmin.js。
JavaScript? ??? ????Closure Compiler、JSMin或YUI Compressor。您可以創(chuàng)建一個(gè)使用這些工具的構(gòu)建流程,以便縮減開發(fā)文件的大小并對(duì)其進(jìn)行重命名,然后將其保存到正式版目錄。
Except as otherwise noted, 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.