<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-17896443</id><updated>2011-12-13T19:57:32.358-08:00</updated><title type='text'>Ajax Goals</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ajaxgoals.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17896443/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ajaxgoals.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>NK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-17896443.post-113166658519847442</id><published>2005-11-10T15:43:00.000-08:00</published><updated>2005-11-10T15:51:23.556-08:00</updated><title type='text'>Is Ajax making XMLHttpRequests to Non-originating servers !!!</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;J&lt;/strong&gt;ason Levitt on &lt;/span&gt;&lt;a href="http://www.xml.com"&gt;&lt;span style="font-family:arial;"&gt;xml.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt; have published an intresting article with title "&lt;em&gt;Fixing AJAX: XMLHttpRequest Considered Harmful&lt;/em&gt;" This article explains few ways to get around the possible security constraints that we can face with in the browsers.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;He writes in his article ....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;p align="justify"&gt;&lt;span style="font-family:arial;"&gt;"...the kind of AJAX examples that you don't see very often (are there any?) are ones that access third-party web services, such as those from Amazon, Yahoo, Google, and eBay. That's because all the newest web browsers impose a significant security restriction on the use of XMLHttpRequest. That restriction is that you aren't allowed to make XMLHttpRequests to any server except the server where your web page came from. So, if your AJAX application is in the page &lt;/span&gt;&lt;a href="http://www.yourserver.com/junk.html"&gt;&lt;span style="font-family:arial;"&gt;http://www.yourserver.com/junk.html&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;, then any XMLHttpRequest that comes from that page can only make a request to a web service using the domain &lt;/span&gt;&lt;a href="http://www.yourserver.com/"&gt;&lt;span style="font-family:arial;"&gt;www.yourserver.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;. Too bad -- your application is on &lt;/span&gt;&lt;a href="http://www.yourserver.com/"&gt;&lt;span style="font-family:arial;"&gt;www.yourserver.com&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;, but their web service is on webservices.amazon.com (for Amazon). The XMLHttpRequest will either fail or pop up warnings, depending on the browser you're using"&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;He suggested three workarounds to get rid from this and they are :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;i) Application Proxy:&lt;/strong&gt; &lt;span style="font-family:arial;"&gt;The server app on the originating server makes the call to the other server. Write an application in your favorite programming language that sits on your server, responds to XMLHttpRequests from users, makes the web service call, and sends the data back to users&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ii) Apache Proxy:&lt;/strong&gt; &lt;span style="font-family:arial;"&gt;The Apache server config is needs to be modified so that requests are re-routed from the originating server to the other server, with your XMLHttpRequest object being none the wiser. You probably won't be able to do this if your application was hosted on a shared hosting service.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;iii) Script Tag Hack with Application Proxy:&lt;/strong&gt; &lt;span style="font-family:arial;"&gt;Dynamically generate a HTML script tag and set the src attribute to make the request. No XMLHttpRequest is made, and the result is JavaScript, not XML. This approach is also known as &lt;a href="http://ajaxpatterns.org/On-Demand_Javascript"&gt;On-Demand JavaScript&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;Read the complete article &lt;a href="http://www.xml.com/pub/a/2005/11/09/fixing-ajax-xmlhttprequest-considered-harmful.html"&gt;here.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:Arial;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/17896443-113166658519847442?l=ajaxgoals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ajaxgoals.blogspot.com/feeds/113166658519847442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=17896443&amp;postID=113166658519847442' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/17896443/posts/default/113166658519847442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/17896443/posts/default/113166658519847442'/><link rel='alternate' type='text/html' href='http://ajaxgoals.blogspot.com/2005/11/is-ajax-making-xmlhttprequests-to-non_10.html' title='Is Ajax making XMLHttpRequests to Non-originating servers !!!'/><author><name>NK</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
