O'Reilly logo

Creating Mobile Apps with Sencha Touch 2 by Bryan P. Johnson, John Earl Clark

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

Getting the data from a remote source

For security reasons, JavaScript (and thus Sencha Touch) is not allowed to make AJAX requests to other domains. This means that if your application resides on myCoolApp.com and you make an AJAX request to the RSS feed at boingboing.net, it will be denied.

The reason for this is the Same Origin Policy, which states that certain browser functions like cookies and AJAX requests can't be shared between different servers. The reasoning being that JavaScript executes within the browser on the end user's computer. This gives JavaScript some unique abilities to interact with the user without having to constantly be in contact with a web server. Once the web browser loads the initial JavaScript files, they are stored ...

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