Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You cant add <strong>"localhost"</strong> as a Origin entry in Response header. This is because of the JavaScript Security Specification for <strong>CORS</strong> <br></p> <p><strong>Access-Control-Allow-Origin</strong> can be set to <strong>*</strong> to allow any website to access the data through XMLHTTPRequest/AJAX But you can't set it to <strong>"localhost"</strong> though. <br></p> <p>Possible solution to overcome the issue are: To host the page that makes the request in a public domain/location and include the host name in the response header <strong>Access-Control-Allow-Origin</strong>.</p> <p>as "@Matthew Flaschen" mentioned, you can use JSONP request with <code>&amp;callback=?</code> to accomplish this <br></p> <p>Or as a last resort, load the JSON result along with a script in a <code>&lt;script&gt;</code> tag by specifying the URL in "src" attribute and access the JSON data<br> eg: modify the result in the server-side to include a <code>&lt;variable_name&gt;={JSONObject}</code> technique and as the script loads, the data is accessible through that variable <br> Some People got the same kind of issue <a href="http://meteatamel.wordpress.com/2011/02/11/access-control-allow-origin/" rel="nofollow">here</a> <br> <br> Still couldn't figure out why browsers deny <code>Access-Control-Allow-Origin=localhost</code> but they support <code>Access-Control-Allow-Origin=*</code> (means that any public websites can access the data but..........) There might be some conspiracy in this thing (track websites that access the data)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload