Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This breaks the <a href="https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript" rel="nofollow noreferrer">Same origin policy</a>. You cannot use a different port, even when using the same domain.</p> <p>You can use JSONP as <a href="https://stackoverflow.com/questions/2099728/how-to-send-request-to-non-80-port-on-the-same-site-with-jquery/2099771#2099771">Doug</a> suggested.</p> <p>Or else, as another possible workaround, you could set up a very simple <a href="http://en.wikipedia.org/wiki/Reverse_proxy" rel="nofollow noreferrer">reverse proxy</a> (using <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html" rel="nofollow noreferrer">mod_proxy</a> if you are on Apache). This would allow you to use relative paths in your AJAX request, while the HTTP server would be acting as a proxy to any "remote" location. </p> <p>The fundamental configuration directive to set up a reverse proxy in <a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html" rel="nofollow noreferrer">mod_proxy</a> is the ProxyPass. You would typically use it as follows:</p> <pre><code>ProxyPass /ajax/ http://www.localhost:8080/ </code></pre> <p>In this case, you would request <code>/ajax/test.xml</code> with jQuery, but in fact the server would serve this by acting as a proxy to <code>http://www.localhost:8080/test.xml</code> internally. </p> <p>If you are using IIS, you may want to use the <a href="http://www.codeplex.com/Wikipage?ProjectName=urlrewriter" rel="nofollow noreferrer">Managed Fusion URL Rewriter and Reverse Proxy</a> to set up a reverse proxy.</p>
 

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