127k views
1 vote
Most of the time, accessing scripts from one domain to another- for instance- from to - isn't permitted because the _________________________ allows scripts to run only if they match in protocol (http vs https, for example) hostname( vs ) and post (port 80 or 443 for http or https traffic by default). For obvious reasons, browsers enforce these rules to block potentially malicious exploits. it would be a poor sort of internet on which clicking any link opened up threats from other sites.

User TehTris
by
8.0k points

1 Answer

2 votes

Final answer:

The same-origin policy is the reason why accessing scripts from one domain to another is not permitted.

Step-by-step explanation:

Most of the time, accessing scripts from one domain to another- for instance- from to - isn't permitted because the same-origin policy allows scripts to run only if they match in protocol (http vs https, for example), hostname( vs ) and port (port 80 or 443 for http or https traffic by default). For obvious reasons, browsers enforce these rules to block potentially malicious exploits. It would be a poor sort of internet on which clicking any link opened up threats from other sites.

User Scott Lafoy
by
7.5k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.