0

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) // getting this in chrome
    // rest of the code which is executing in firefox
}

Chrome Version is : 59.0.3071.115 (Official Build) (64-bit)

Firefox Version is: 52.0.2 (64-bit)

I am not able to understand that if I am making some mistake or it is related to browser. Please help me to understand this.

Any helpful suggestion will be appreciated!

yugantar kumar
  • 1,982
  • 1
  • 23
  • 33

0 Answers0