jquery.js is loaded multiple times


Is there any way to avoid loading scripts like jquery.js and others like jquery.yiiactiveform.js multiple times?

Thanks in advance!


What do you mean with “loading multiple times”? If you use that scripts on subpages, the browser caches the data anyway - so there shouldn’t be any performance issues.

If you mean that you experience duplicate script downloads in combination with Ajax requests than there is an easy fix using the scriptMap property of CClientScript. On ajax requests you set the "scripts keys" that are causing the problem to false like so:




NLSClientScript may help.