There's this interesting thing i did with json test your skills

I solve all examples locally and can’t find the starting file in this test , so i downloaded The solution (its name is same as starting files as in previous but it is solved) and removed the solved code ( i really solved it myself , so happy).
I download this the sample json file too.
I stored them both on a same folder and it worked fine. But on the test it’s written cross origin security something so we can’t do it locally. But i think we can do it this way because both are on same origin. So i think you update the test page with this. And also it’s simple no complex things used.
In case i am wrong i am happy to hear it.

The test of which i am talking about.
This is the test

Thank You

hello @Mad2000

unfortunatly i did not get you what do you mean with this way
did you managed to run this example locally without having local server or what ? and if you did could you share your code

and have a nice day :slight_smile:

sorry i was using live server of VS code.
but still it was not mentioned you could get this working on local server. beginners can become confused after reading that you can’t run it locally.

it’s ok do not be sorry

that what written there
Warning : To answer this question, you’ll need to write your code into the live code window above. The example won’t work locally, or in an environment like CodePen or JSFiddle, because of something called cross-origin security . This basically means that you can’t request a file from one origin using code on a different origin. In the live code editor above, both the JavaScript code and the requested JSON file are on the same origin (the code sits on a GitHub repo, and is embedded here in an <iframe> ). If you put your code on CodePen for example, it would fail because the JSON it is requesting is not on the same origin. You can get around these restrictions using CORS, but this is beyond the scope of what we are teaching here.

but they did not mention the local server thing cause they still did not explain how to do that and they mention the CORS link to give more details about the cause