Cookieless domain for static content

Hi all,

which is the best way to implement a cookieless domain for serving all static contents in Yii?

For example, if my domain is and I want images, css, etc. served by, which is a cookieless domain, should I do something like changing Yii::app()->theme->baseUrl then use it for referencing all static contents?



I would use You can easily implement it with this extension. You may modify the extension a little. Currently you have to do:

$imgsrc = yii::app()->parallelized->getParallelizedHost() . 

          yii::app()->baseUrl . '/images/img0020.jpg';

this would be better imo:

$imgsrc = yii::app()->parallelized->baseUrl() . '/images/img0020.jpg';

Thank you. Actually I don’t need the parallelization part (we have a hardware network balancer), so I’ll just add to all images and css urls.



I think it’s better to add this facility to CWebApplication, and manage assets this way