0

I found this thread : Probem using SenchaTouch 2

Sadly it can't help me on Mac OS.

I have the exact same problem. My App.json cause an Error 404.

I'm using apachectl (terminal in mac OS) and I don't know how to add MIME to it to make everything work on Chrome.

I'm also wondering why it works on Safari but not on Chrome.

The error I am getting :

XMLHttpRequest cannot load file://localhost/Users/guillaumecharron/Sites/CarboZero/app.json. Cross origin requests are only supported for HTTP. index.html:1
Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101 
4

1 回答 1

2

Chrome won't allow making Ajax requests to files without disabling web security. Either you need to run it on server or disable web security. So start chrome with following command and flags

open Chrome.app --args --disable-web-security

First close all chrome windows currently opened and then run above command in terminal. You can then make HtppRequests with file://... protocol as well.

于 2013-06-22T07:15:53.597 回答