O'Reilly logo

Sencha Touch Cookbook - Second Edition by Ajit Kumar

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

Using a cross-domain URL in your application

Besides Ajax, JsonP is the other server proxy that helps us to persist the model on a remote server and load it from the same. The only catch is that this proxy is used only when the domain where the server is running is different from the domain where the application is running; for example, loading the search detail from the Google Custom search API. This recipe outlines the usage of the JsonP proxy to make cross-domain URL calls.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1, Gear Up for the Journey.

Make sure that you have the ch05 folder created inside the www folder.

Get the API key for Google's Custom Search by following the ...

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