XMLHttpRequest; Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource [duplicate]

All research into that specific error message suggests that the host web page is not being loading via an http:// URL and is probably a file: URL. The browser will not, by default, permit cross origin requests from a file: URL.

You need to load the web page through your web server, not via the file system if you want to use ajax requests.

Here are some other questions and answers about that specific error that all point to the wrong type of URL being used to load the page.

“Cross origin requests are only supported for HTTP.” error when loading a local file

React.js: Example in tutorial not working

Cross origin requests are only supported for HTTP but it’s not cross-domain

http://answers.playcanvas.com/questions/833/cannot-load-model-due-to-cross-origin-request-being-blocked

https://groups.google.com/forum/#!topic/tincr-for-chrome-devtools/nA9k2qh7F-g

Leave a Comment