RadleyMith
RadleyMith

Reputation: 1343

AJAX not working with web server but working on local filesystem; IIS 7.5

Here is the call:

$.get('js/questionJSON.json', function(data){       

    //erroneous code
},'json');

I can't seem to figure out why the call won't work on the local web server, but will work on the local file system. I was wondering if it had something to do with Same-Origin-Policy.

Upvotes: 0

Views: 650

Answers (1)

RadleyMith
RadleyMith

Reputation: 1343

I figured it out eventually. IIS 7.5 does not come with JSON as a MIME type. After adding JSON as a MIME type it worked fine.

Upvotes: 1

Related Questions