O'Reilly logo

PhoneGap for Enterprise by Kerri Shotts

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Communicating with the backend using XHR

Most of the time, you'll want to communicate with your backend server by using XMLHttpRequest to send and receive JSON-formatted data. From now on, we'll use XHR as an abbreviation for this term.

XHR was designed by Microsoft in order to allow web applications to communicate with other servers and increase web app dynamism and responsiveness. XHR was later implemented by other browser vendors, and it eventually became a W3C standard.

The first version of XHR was amazing for the time, but it became apparent that additional flexibility was needed, and so XHR level 2 (XHR2) was created. Built on the original standard, XHR2 increased security by providing support for cross-domain requests using Cross-Origin Resource ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required