O'Reilly logo

Web Application Development with Yii 2 and PHP by Jeffrey Winesett, Mark Safronov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Minimizing the assets

Obviously, in complicated setups, you'll have a lot of CSS and JavaScript files registered to pages, and this is a major drawback. The current best practice is to compress and combine all CSS files into a single file and do the same with JavaScript files. As a result, we serve just two files instead of the whole bunch. You probably already know all of this. It would be really cool to have the asset system in Yii do it for you implicitly, though currently, there is no such provision. Yii has, however, got the helper console command that you can use to simplify the process of compressing your assets and wiring them to your application. The most beautiful part is that you will not need to change any of your view files; all existing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required