Take the 2-minute tour ×

I'm working on a Yii application in which in some part of it I need to use a CGridView to show some database records.My aim is to update it's result by an ajax call(based on some filters on table columns) but the problem is in each call CGridView establishes a new get request for getting it's related jquery files and this causes increasing my website loading time.
Is there any way to tell CgridView to get these files only one time in the first ajax request? how can I stop it from getting these files several times?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Use scriptMap to prevent loading of jquery files in your ajax call.


You can get or load js file externally, you can found your answer here.

share|improve this answer
I used the same code to prevent Yii loading jquery&co. even with 'ajaxUpdate' => 'false'. –  Paolo Apr 5 '13 at 16:50
add comment

Your Answer


