Aggregating content from different sites
When a Web application integrates contents from multiple sites, the same-origin policy prevents the originating Web page from getting or setting the properties of a document from a different origin.
An AJAX proxy is an application-level proxy server that mediates HTTP requests and responses between Web browsers and servers. AJAX proxies allow Web browsers to bypass the same-origin policy and therefore to access third-party servers using XMLHttpRequest. To realize this bypassing, you can choose from two approaches:
- The client-side Web application is aware of the third-party URL and passes it as a request parameter in the HTTP request to the AJAX proxy.
- The client-side Web application is not aware of the third-party URL, and it tries to access resources on the AJAX proxy server through HTTP. By a predefined encoding rule, the AJAX proxy translates the requested URL into a third-party server URL and retrieves contents on behalf of the client.
Related concepts
The importance of the proxy for Ajax