“Cross origin requests” error when loading local file in chrome but in firefox. Why? [duplicate]
问题 This question already has answers here : Jquery load() only working in firefox? (2 answers) Read local XML with JS (5 answers) Closed 2 years ago . I was trying to load a local json file using d3.json method, but I am getting an error . Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https But if I load the same in mozilla firefox , it runs perfectly fine. My code is: d3.json("some_local_file.json", function(e, data) { if (e) console.warn(e