Enjoy an ad free experience by logging in. Not a member yet?
Register .
01-25-2011, 12:39 PM
PM User |
#1
Banned
Join Date: Mar 2007
Posts: 1,523
Thanks: 116
Thanked 0 Times in 0 Posts
Allow Ajax request cross domain?
Hi,
I have searched and searched...
Is there a way of using the Ajax httpRequest cross domain?
thanks
01-25-2011, 02:06 PM
PM User |
#2
Supreme Master coder!
Join Date: Jun 2002
Location: London, England
Posts: 17,100
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Quote:
Originally Posted by
jarv
Hi,
I have searched and searched...
Is there a way of using the Ajax httpRequest cross domain?
thanks
No. For security reasons JavaScript cannot access anything beyond the domain of the current page. This is known as the "same origin policy" and prevents a document or script loaded from one origin from getting or setting properties of a document from a different origin.
All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
01-25-2011, 02:37 PM
PM User |
#3
Banned
Join Date: Mar 2007
Posts: 1,523
Thanks: 116
Thanked 0 Times in 0 Posts
I was told that I can buy a program that allows it from here:
http://www.ajax-cross-domain.com/
hmm...
Also, someone else said I can build a Proxy?!
01-25-2011, 04:38 PM
PM User |
#4
Supreme Master coder!
Join Date: Jun 2002
Location: London, England
Posts: 17,100
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Quote:
Originally Posted by
jarv
Sure - but the operative word is
buy . That program is written in
Perl and outputs its content as a JavaScript file. That works around the "same origin" policy.
01-25-2011, 04:50 PM
PM User |
#5
Banned
Join Date: Mar 2007
Posts: 1,523
Thanks: 116
Thanked 0 Times in 0 Posts
thanks, might use JSON
01-25-2011, 04:57 PM
PM User |
#6
Master Coder
Join Date: Dec 2007
Posts: 6,682
Thanks: 436
Thanked 890 Times in 879 Posts
Quote:
Originally Posted by
jarv
Hi,
I have searched and searched...
Is there a way of using the Ajax httpRequest cross domain?
thanks
in some condition:
http://www.w3.org/TR/cors/
best regards
01-25-2011, 08:26 PM
PM User |
#7
Senior Coder
Join Date: Jun 2007
Location: Urbana
Posts: 3,553
Thanks: 9
Thanked 480 Times in 463 Posts
all browsers since IE8 support cross-site ajax. JSON can't do anything that xml can, though JSONp is potential solution.
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:15.2% IE7:0.5% IE8:8.4% IE9:8.5%
IE10:8.5%
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 10:52 PM .
Advertisement
Log in to turn off these ads.