gzip's tag archives

MySQL Optimize Top 21 Tips

1. Optimize Your Queries For the Query Cache Most MySQL servers have query caching enabled. It’s one of the most effective methods of improving performance, that is quietly handled by the database engine. When the same query is executed multiple times, the result is fetched from the cache, which is quite fast. The main problem is, it is so easy and hidden from the programmer, most of us tend to ignore it. Some things we do can actually prevent the query cache from performing its task. vie...

ThinkPHP中实现gzip压缩

ThinkPHP中似乎没有对gzip的配置选项。不过实现起来还是挺简单的。以下是对 ThinkPHP 2.1 的修改方法。 首先要确定空间是否支持Zlib, 然后找ThinkPHP的控制输出函数output()。 控制输出的文件在 ThinkPHP/Lib/Think/Core 文件夹下,文件名 View.class.php。

How to use Gzip to load your site faster in 5 minutes

This tutorial will only examine one particular way of implementing Gzip compression with PHP, but there is another way to accomplish it with Apache if you have administration access to your server. Step 1: Enable zlib compression in php. You can do this many ways, just choose one: * Add a line to your .htaccess file: * Add or change a line in your php.ini file: * Add a line to the top of your PHP scripts before any output: Now that you’ve done that (and particularly...