三毛笔记

Typecho优化加速笔记

开启Gzip

开启Typecho的Gzip功能很简单,只需在根目录下的index.php文件加上下面这一句就可以了:

/** 开启Gzip */
ob_start('ob_gzhandler');

注意是整个网站根目下的index.php文件,不是主题目录下的。

开启后,检测一下效果:https://tool.chinaz.com/Gzips/

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »