re: How can I read a local JSON file in HTML/JavaScript? VIEW POST

re: Oh, yes regarding CORS policy. Since, I was using Firefox, I had to disable something related to CORS. My directory structure is as follow: C:. ...

What about other browsers? And how can I ensure, or detect whether a user toggled said specific CORS flag in their browser?
If you could answer these, especially the second one, that would really help me.
Thank you so much!

So, I decided to quickly test it using GitHub pages. Instead of using console.log(data) I got the div and changed the text content:


and JSON being:

  "id": "Foo"

I've only tested it on my current browser (Firefox with CORS thingy off) and my s9+ using bromite (Chromium based) and it seems to be displaying the value of id without any issues.

code of conduct - report abuse