How can I use JavaScript to load a JSON file from my desktop? or What's the best way to load a JSON f

14 Replies, 1328 Views

If you’re just testing, you could use Firefox—it’s a bit more lenient with local file access. Still not perfect, but might get you past the CORS error temporarily.

For a proper solution, though, a local server is unavoidable. Tools like XAMPP or WAMP can help if you’re not comfy with command line stuff.

Also, if you’re using React/Vue, their dev servers usually handle this automatically. Just drop the JSON in the `public` folder and fetch it like it’s hosted.

Messages In This Thread



Users browsing this thread: 1 Guest(s)