I am trying to read a json file at localhost. it is not read by the browser. is this even possible? the json file is kept in my local pc.
$.getJSON("p.json",function(data){
alert("success");
});
chrome gives me a 404 for this. the file is there. http://localhost/myfoldername/p.json
what is it that i am doing wrong? the json file has not been prepared by a server, but i have prepared it my self. the syntax is correct, though.
EDIT: if i shoot to the file in the browser by hitting its url, localhost/myfolder/p.json, it gives me a 404.3 error saying if it is a script file, there should be a MIME handler for it. how to get this working?? – amit 0 secs ago edit