10 lines
512 B
Plaintext
10 lines
512 B
Plaintext
---
|
|
title: Explain the same-origin policy with regards to JavaScript
|
|
---
|
|
|
|
The same-origin policy prevents JavaScript from making requests across domain boundaries. An origin is defined as a combination of URI scheme, hostname, and port number. This policy prevents a malicious script on one page from obtaining access to sensitive data on another web page through that page's Document Object Model.
|
|
|
|
## References
|
|
|
|
- [Front End Interview Handbook](https://www.frontendinterviewhandbook.com/javascript-questions)
|