Difference between #4 and #5 of
Enabling Gzip

Revision #5 has been created by rainyjune on Jun 16, 2010, 2:20:43 AM with the memo:

add Chinese version
« previous (#4) next (#6) »


Title unchanged

Enabling Gzip

Category unchanged


Yii version unchanged

Tags unchanged

Content changed

* Indexing these items as `onBeginRequest` and `onEndRequest` will trigger attaching callbacks to application events.
* Event handlers are even acceptable since they'll take the event object as first argument.
* Please visit official PHP site for more information regarding [ob_start](http://php.net/ob_start) and [ob_gzhandler](http://php.net/ob_gzhandler). In summary, the latter will check whether the client is compatible with gzipped content, set the Content-Encoding header and compress all the content generated during processRequest accordingly.
* If the current browser is not capable of uncompressing gzip, gzhandler will leave the output untouched.

(If you need additional functionality, you may want to create a separate file for these functions.)

### Links
[Chinese version](http://dreamneverfall.cn/node/109)
6 1
Viewed: 26 910 times
Version: 1.1
Category: Tutorials
Written by: pestaa
Last updated by: Yang He
Created on: Jul 10, 2009
Last updated: 5 years ago
Update Article


View all history