Difference between #2 and #8 of
Enabling Gzip

Changes

Title unchanged

Enabling Gzip

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

Adding httpHTTP compression to your application could never have been easier! Just addinsert the following two lines to your configuration array, and the PHP will do the rest.
[...]
An overview about this:

* PHP's `create_function` will create lambda functions
in runtime, so you don't have to worry about external files. It'll take the parameter list and the internal code, respectively, and return the newly added function name, which will serve here as callbacks.
* 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.
[...]
* 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.)

 
6 1
13 followers
Viewed: 38 933 times
Version: 1.1
Category: Tutorials
Tags:
Written by: pestaa
Last updated by: Yang He
Created on: Jul 10, 2009
Last updated: 11 years ago
Update Article

Revisions

View all history