This link has been bookmarked by 120 people . It was first bookmarked on 15 Sep 2007, by someone privately.
-
03 Sep 13
-
17 Jan 13
-
writing client web applications that use this object can be tricky given restrictions imposed by web browsers on network connections across domains
-
a web proxy that relays network requests from your web server to services
-
All modern web browsers impose a security restriction on network connections, which includes calls to XMLHttpRequest
-
If both your web application and the XML data that application uses come directly from the same server, then you do not run into this restriction.
-
the browser prevents the connection from being opened at all.
-
Bummer
-
There are a number of solutions to this problem
-
Instead of making your XMLHttpRequest calls directly to the web service, you make your calls to your web server proxy
-
The proxy then passes the call onto the web service and in return passes the data back to your client application
-
An open proxy that passes on connections to any web site URL is open to abuse
-
Use apache's
mod_rewriteormod_proxyto pass requests from your server to some other server
-
-
28 Dec 12
-
31 Oct 12
-
29 Oct 12
-
16 Aug 12
-
04 Jan 12
-
29 Nov 11
-
28 Nov 11
-
29 Oct 11
-
07 Oct 11
-
07 Sep 11
-
25 Aug 11
-
21 Jul 11
-
17 Jul 11
-
20 Apr 11
-
06 Apr 11
-
22 Feb 11
mgraber"JavaScript: Use a Web Proxy for Cross-Domain XMLHttpRequest Calls"
-
22 Dec 10
-
14 Dec 10
-
16 Nov 10
-
09 Nov 10
-
20 Oct 10
-
25 Sep 10
-
12 Aug 10
-
11 Aug 10
-
08 Jul 10
-
30 Jun 10
-
27 May 10
-
15 May 10
-
07 May 10
-
03 Feb 10
-
18 Nov 09
-
08 Nov 09
-
Use apache's
mod_rewriteormod_proxyto pass requests from your server to some other server. -
no other browsers support script signing at this time, so this solution is of limited use.
-
-
30 Oct 09
-
28 Oct 09
-
13 Oct 09
-
14 Sep 09
-
11 Aug 09
-
16 Jul 09
-
04 Jun 09
-
15 May 09
-
08 Feb 09
-
06 Nov 08
Steve WildeJavaScript Developer Center :
yahoo webservices webdev web2.0 web tutorial tips reference xhr xml xmlhttprequest yui tt280
-
23 Oct 08
-
03 Oct 08
-
15 Sep 08
-
14 Sep 08
-
03 Sep 08
-
29 Aug 08
-
10 Jun 08
-
06 May 08
-
- Use apache's
mod_rewriteormod_proxyto pass requests from your server to some other server. In your client code you just make the request as if it was actually on your server -- no browser problems with that. Apache then does its magic and makes the request to the other server for you. - Use JSON and dynamic
<script>tags instead of XML and XMLHttpRequest. You can get around the browser security problem altogether by making your web services request directly inside a<script>tag. If the Yahoo! Web Service you're using can output JSON (using theoutput=jsonandcallback=function parameters), the data you get back from the web service is evaluated as a JavaScript object when the page is loaded. See our JSON Documentation for an example of how to do this in your own scripts. - Digitally sign your scripts. In Firefox you can apply a digital signature to your script and those scripts will then be considered "trusted" by the browser. Firefox will then let you make XMLHttpRequests to any domain. However, no other browsers support script signing at this time, so this solution is of limited use.
Other Solutions
In addition to using a web proxy to pass web services data to your application, there are several other options to working around cross-domain browser restrictions:
- Use apache's
-
-
01 May 08
-
29 Apr 08
-
11 Apr 08
-
04 Apr 08
-
02 Apr 08
-
31 Mar 08
-
28 Mar 08
-
13 Mar 08
-
28 Feb 08
-
15 Feb 08
-
09 Jan 08
-
e a security restriction
-
er will allow cross
-
-
02 Jan 08
-
20 Dec 07
-
09 Dec 07
-
27 Nov 07
-
18 Nov 07
nicolas ferayther by making your web services request directly inside a <script> tag. If the Yahoo! Web Service you'r
-
20 Oct 07
-
27 Sep 07
-
20 Sep 07
-
23 Aug 07
-
09 Aug 07
-
18 Jun 07
-
02 Jun 07
-
10 May 07
-
15 Mar 07
-
21 Feb 07
Ikerne JaureguiAll modern web browsers impose a security restriction on network connections, which includes calls to XMLHttpRequest. This restriction prevents a script or application from making a connection to any web server other than the one the web page originally c
-
13 Feb 07
-
09 Nov 06
-
22 Oct 06
-
26 Sep 06
-
07 Aug 06
-
12 Jul 06
-
20 Jun 06
-
09 May 06
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.