A filter that compresses HTML. It also compresses CSS.
Demo ¶
Click here for the demo. If you check the source code you will see that it is compressed.
Requirements ¶
Yii 2.x
Usage ¶
Copy HtmlCompressorFilter.php to the filters directory (create it if it doesn't exist).
Add an entry to the behaviors array:
public function behaviors()
{
return [
[
'class' => 'app\filters\HtmlCompressorFilter',
],
];
}
Filter only applies when YII_DEBUG == false.
Donations ¶
Donations are welcome. Thanks for your support!!!
...
Copy HtmlCompressorFilter.php to the filters directory (create it if it doesn't exist).
are you kidding me?) where is a composer package?
You wrote yet another Spaceless widget https://github.com/yiisoft/yii2/blob/master/framework/widgets/Spaceless.php
re: zelenin
Hi,
I'm sorry if I did something wrong, I'm quite new to Yii 2. In this case, what should I do to install it in a "composer" way?
thanks
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.