Js Load Several Times, Slow Web


I’m using “zii.widgets.jui” classes, and I have a problem when the application loads.

File "jquery.min.js" into "jui" assets folder loads several times, then my web loads very slow. It takes about 6 minutes to load. This happens in remote host, not in localhost.

I tried this solutions:

Sol 1

Sol 2

Sol 3

And others but the problem still persists.

For example, if I write this in "main.php":






                          (YII_DEBUG ? 'jquery.js' : 'jquery.min.js') => false,





The page loads very fast, but the CJuiDialogs(for example) doesn’t loads/shows.

I get this error in Firebug:

ReferenceError: jQuery is not defined

Anyone can help me?


What exactly is the problem? Does the JS files load multiple times in your browser or there are too many copies of them in assets? If it’s the latter one, maybe the filesystem on your remote server breaks the asset manager, which depends on file modification times.

Maybe the problem isn’t that the js is loaded several times.

Fiddler only shows me one call to "jquery.min.js". The server takes a long time to answer this call and Fiddler shows this error:

Content-Length mismatch: Response Header indicated 94.840 bytes, but server sent 32.461 bytes.

Everything worked properly a week ago and the code hasn’t been changed.

Fiddler just show me another error:

ReadResponse() failed: The server did not return a response for this request. Server returned 0 bytes.

I don’t know what’s going on.