title: Cross origin requests are only supported for HTTP not fixed even after Chrome --allow-file-access-from-files
body: <p>I am parsing a json file in my Javascript code like below.</p>
  
  <pre><code>$.getJSON('file:///dashboard.json', function (json) {
  </code></pre>
  
  <p>However, it throws </p>
  
  <p><code>XMLHttpRequest</code> cannot load <code>file:///dashboard.json</code>. <code>Cross origin requests</code> are only supported for <code>HTTP</code>.</p>
  
  <p>I've been looking for solutions for almost 7 hours collectively, but most suggestions were to use this:</p>
  
  <pre><code>/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files
  </code></pre>
  
  <p>or</p>
  
  <pre><code>open -b com.google.chrome --args --allow-file-access-from-files
  </code></pre>
  
  <p>and even when I opened Chrome with the second command, the same Cross origin request error is thrown.</p>
  
  <p>The first command does not even run, as you can see below.</p>
  
  <pre><code>$ /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
  [708:1287:0401/174956:ERROR:process_singleton_mac.cc(103)] Unable to obtain profile lock.
  $ [0401/174957:ERROR:mach_broker_mac.mm(152)] Failed to look up named parent port: 0x44e unknown error code
  </code></pre>
  
  <p>I tried launching a server with this file, on port 8000, and accessing it by providing url <code>http://localhost:8000/dashboard.json</code>, but it does not fix Cross origin request error. (My web app runs on port <code>8080</code>).</p>
  
  <p>What is the problem? How can I fix this?
  Please help me. Thank you.</p>