I am new for cross platform mobile app development using HTML frameworks like Sencha. Today, I've downloaded Sencha Touch 2.3.1 and tried to open an index file in the examples folder came with the download package.
Surprisingly I couldn't see anything and my console log said
Cross-origin-requests-are-only-supported-in-HTTP
for bootstrap.json
I have seen the same error for some html files on lungo framework's examples. What could be the reason for this ?
I hope all these files will load correctly if I upload them on a server, but I will be wrapping the js file as package while building the app, so this will not work.
I am aware of the Cross Origin Policy which restricts JS to send request to different origin, but I don't understand why this is happening when I have these files locally. Please help me understand this and explain how to overcome this issue.
when you open the page with file://
protocol, the browser disables requests to other files. so when schena touch tries to load bootstrap.json, your browser throws that error. the solution is to host your site on a local webserver and access it through http://localhost/
I recommend appache server, wamp if you're on windows