Remove defualt javascript files from head in yii

Yii

Posted on 17 Mar 15 by Vickey
  760



In yii there are many javascript and css files load by defualt and these can break our custom js or css. if you will check your header code then these will not appear but on load time these comes dynamiclly. we can remove these files by writing some code in our Controller.php under /app/Components/. go to Controller.php file and search init() function if it does not exist create new

public function init(){

}

and now add

public function init(){

    Yii::app()->clientScript->scriptMap=array('jquery.yiiactiveform.js'=>false,'jquery.min.js'=>false);
}

in this code which file you do not want to load make it false like in this example i made jquery.yiiactiveform.js'=>false


If this post help you reduce time to develop, you can help me to maintain this website :)
www.000webhost.com