Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can't circumvent cross-domain origin with XHR (well, only in Firefox 3.5 with user's permission, not a good solution). Technically, moving from port 80 (http) to 443 (https) is breaking that policy (must be same domain and port). This is the example the specification itself sites here - <a href="http://www.w3.org/Security/wiki/Same_Origin_Policy#General_Principles" rel="nofollow noreferrer">http://www.w3.org/Security/wiki/Same_Origin_Policy#General_Principles</a>.</p> <p>Have you looked into JSONP (<a href="http://en.wikipedia.org/wiki/JSON#JSONP" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/JSON#JSONP</a>) or CSSHttpRequests (<a href="http://nb.io/hacks/csshttprequest" rel="nofollow noreferrer">http://nb.io/hacks/csshttprequest</a>)?</p> <p>JSONP is a way to add a <code>&lt;script&gt;</code> tag to a page with a pre-defined global callback across domains (as you can put the <code>&lt;script&gt;</code>s <code>src</code> to anywhere on the web). Example:</p> <pre><code>&lt;script&gt; function globalCallback (a) { /* do stuff with a */ } </code></pre> <p>And then you insert a <code>&lt;script&gt;</code> tag to your other domain, like so:</p> <pre><code> var jsonp = document.createElement('script'); json.setAttribute('src','http://path.to/my/script'); document.body.appendChild(jsonp); &lt;/script&gt; </code></pre> <p>And in the source of the external script, you must call the <code>globalCallback</code> function with the data you want to pass to it, like this:</p> <pre><code> globalCallback({"big":{"phat":"object"}}); </code></pre> <p>And you'll get the data you want after that script executes!</p> <p>CSSHttpRequests is a bit more of a hack, so I've never had the need to use it, though feel free to give it a try if you don't like JSONP, :).</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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