Can't load Jquery in LOCALHOST

Hi everyone :)

We have a problem, we have a website on a server and everything is working perfectly.

We pull the code from git on a local machine for Dev…

The site loads… but the jQuery won’t work on [localhost].

  • We checked all the files and folders permissions… everything is full open to 777 and STILL nothing will work.

  • We checked all paths… eveything echo out the right location.

  • We checked with "firebug" and we get an:

[color="#0000FF"]http://localhost/MyWebsite/jsfiles/myExtruder.js

304 Not Modified[/color]

I’m really confuse, I think it might be a problem with Apache that for some reason it won’t load the .js Files.

Any of you mignt have an idea?

Thank you for your time :lol:

when you view the source and click on the generated jquery url, can you see it in your browser ? does the url looks correctly to you ?

Check the server and see if you have mod_security enabled, if so, disable it.

1- Are you using Yii framework ?

If yes then you need to register the JQuery js

2- Check the URL if it is accessible or not

Steps: right click on the page, then view source click on the jquery URL.

Thank you for your quick responds.

Yes I do.

I did exactly that, and in server side, it’s working perfectly, it’s just locally that it won’t work <_<


Yii::app()->clientScript->registerScriptFile(Yii::app()->request->getBaseUrl(true).'/jsfiles/myExtruder.js', CCCheck the server and see if you have mod_security enabledlientScript::POS_HEAD);

Yes, the browser can see the .js and navigate in it. All the .js are read by the browser, but won’t load it :(

I tried to edit my .htaccess in the root folder and add

SecFilterEngine Off

SecFilterScanPOST Off

Restart Apache, but no luck… Still won’t work :o


Anyone have a suggestion on how I can approach the problem?

Thank you for your time :lol:

Bump! :-X

In your replies, the file you are registering is not jquery, it is myExtruder.js

You need to add this before your other javascript files:


<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>

Yes it’s all there too :)

But I’m still struggling to find why Apache won’t load Jquery (Localy) :(