- XMLHttpRequest cannot load file:///C:/Users/user/Desktop/readJson/data/file-1.json. Origin null is not allowed by Access-Control-Allow-Origin.
Although it should work if i upload those sources files to a web server, i would still make it work locally especially for development purpose. So here is a small trick which could ask the Chrome browser to bypass this cross-domain restriction.
1. Close all the Chrome browser windows.
2. Run the following command in shell or windows run command prompt as follow.
Reference: StackOverflow – Problems with jQuery getJSON using local files in Chrome
2 thoughts on “Chrome – Bypass Access-Control-Allow-Origin on local file system”