With regard to cross-domain, am I calling a third-party interface cross-domain?

there are many questions about how to solve cross-domain problems, but I have always had a question, such as the figure below. Find a bunch of them on the Internet to explain cross-domain problems

web http://store.company.com/dir/...

according to the general homologous rules found, am I cross-domain to call Baidu"s interface? Why can it still be successful? And many third-party development services must be different from mine, should also be cross-domain, but can be invoked.

is it that I have a problem with cross-domain understanding? Or did the third party who provided the interface handle it?

Mar.23,2021

is cross-domain. But the interface provider handled it.
the processing method is
CORS


first of all, it depends on your access method, whether it is subject to cross-domain restrictions. Some access is unrestricted. For example, script,css embedded in other domains in the page is allowed. For example, there are ajax requests. For a detailed list, please see here

.

https://developer.mozilla.org.

again, if your access is within the scope of cross-domain restrictions, it depends on whether the server side has opened cross-domain access. Currently, the default is not open. There is a CORS specification that leaves some backdoors for cross-domain access, that is, you can open cross-domain access by certain means. At this time, you should ask the server side (the client side does not have to do anything).

in the early years, there was a special technique called JSONP to get around cross-domain restrictions, but now CORS,JSONP is less used.

Menu