Some suggestions of options that i don’t find in Yii. Some of that options can improve the application’s performance, and is been used by various web developers.
I’m learning about it, and after a great search into Yii structure folders, i don’t find a way to put the tag “defer” in the script tag generated by the Yii. In some cases, this tag could substantially reduce the time for loading scripts. Right now i want to defer the load of the CActiveform widget, but i can’t do it.
Other suggestion that i have, and is a question to. I read the tutorial to enable gzip compress to application. But, from what i say, the gzip isn’t working to the assets folder. I tried something with .htacces, but don’t works to css e js files generated in the assets folder.
Well, I apologize if I’m wrong about these 2 things. If already exists a way to resolve the 2 situations, will be nice if someone show me the solutions.
serving static files does not involve running php and Yii so you cannot use same solution for such files as for rendered pages. However you can configure compression on webserver level (in Apache there is mod_deflate) but there must be proper modules installed (if you can administer server confguration you are a winner, if this is shared hosting - there should be everything installed but not always).
Yeah, i’m already using the POS_END, but furthermore, my intention is load the scripts after the parsing of the page. Some scripts i wanna call just when i need of them. This is what the “defer” attribute does.