News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

David Müller:
Cross Domain AJAX Guide
December 10, 2012 @ 12:17:39

In his latest post David Müller covers some of the things to consider when working with cross-domain ajax requests including CORS and iframes.

As it is widely known, AJAX Requests are only possible if port, protocol and domain of sender and receiver are equal. [...] Having this cleared out, we will cover ways around this restriction.

He covers three main approaches to allowing these cross-domain requests (and some of the security implications that can come with them):

  • CORS (Cross Origin Resource Sharing)
  • JSONP (Javascript with a local domain callback)
  • Iframes

He also briefly mentions things like window.postMessage (HTML5) and the use of a backend script to proxy a request into your application's local code.

0 comments voice your opinion now!
crossdomain ajax cors iframe jsonp tutorial introduction


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Paging and Sorting Data with Zend Framework, Doctrine and PEAR (part 1)

ThinkPHP Blog: Methods to Reduce the Load of Your Webserver by Caching Content

SitePoint PHP Blog: Fractal: a Practical Walkthrough

Jani Hartikainen's Blog: Complex custom elements in Zend_Form

Ryan Gantt's Blog: Horizontal reusability with traits in PHP 5.4


Community Events

Don't see your event here?
Let us know!


community framework laravel release voicesoftheelephpant php7 library conference example performance extension opinion interview version application symfony2 series podcast introduction api

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework