What is the primary purpose of CORS (Cross-Origin Resource Sharing) in web development?
- ATo compress web page content for faster loading
- BTo allow or restrict web pages from making requests to a domain different from the one that served the page, as a security mechanism
- CTo encrypt data transmitted over HTTPS
- DTo cache static resources in the browser
Correct answer: B