Home >Web Front-end >JS Tutorial >Summary of JavaScript cross-domain methods_javascript skills
Doing web development often requires you to face cross-domain problems. The root cause of cross-domain problems is the same-origin policy in browser security. For example, for http://www.a.com/1.html:
1.http://www.a.com/2.html is of the same origin;
2. https://www.a.com/2.html is from a different source because of different protocols;
3. http://www.a.com:8080/2.html is from different sources because the ports are different;
4. http://sub.a.com/2.html is of different origins because the hosts are different.
In the browser, the tags