P
P
Pavel_Proca2017-07-04 19:28:42
JavaScript
Pavel_Proca, 2017-07-04 19:28:42

How to solve Cross origin requests issue in Google Chrome?

When trying to load data from xml to html in the console, such a problem appears. How to solve it, and what is it caused by?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Pavlenko, 2017-07-04
@Pavel_Proca

You open the file locally, but you need to set up a web server like Apache, and already access it using localhost
. These are the very basics of the basics, so no one wanted to waste time answering you.
You can download https://www.apachefriends.org/ru/index.html ; google "how to set up Apache on Windows", make localhost point you to the right folder and already access the right file not using file:// when Chrome reads the file from disk directly, but through an internal web server.

L
Leonid Knyazev, 2017-07-04
@amorphis

Everything is written there:

Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question