✏️ Explanatory Question

Explain the same-origin policy and how it affects AJAX requests.

👁 106 Views
📘 Detailed Answer
🟢 Easy
106
Total Views
10
Related Qs
0%
Progress
💡

Answer with Explanation

Answer: The same-origin policy is a security feature in web browsers that restricts web pages from making requests to a different domain than the one that served the original web page. This policy is in place to prevent potential security vulnerabilities. In AJAX, it means that requests can only be made to the same domain unless the server supports Cross-Origin Resource Sharing (CORS) or other mechanisms are in place to relax the same-origin policy.