NLSClientScript extends the CClientScript class smart loading javascript files and optionally merging/minifying js+css files.

Learn, download, comment and rate it on the Yii NLSClientscript page.

demo: click here more times to execute the ajax request described below

... to be updated
<!-- container to be updated -->
<div id="test">... to be updated</div>
<!-- response -->
<script type="text/javascript" src="/js/test.js"></script>
<b>Container updated. You should see the alert only the FIRST TIME!</b>
alert("I'm test.js. Close me and click again the Demo link!");