Cross-origin resource sharing
Appearance
Cross-Origin Resource Sharing (CORS) is a browser technology specification, which defines ways for a web service to provide interfaces for sand boxed scripts coming from a different domain under same origin policy[1]. CORS is a modern alternative to JSONP pattern. While JSONP only supports only GET request method, CORS supports also other types of http requests. Using CORS enables web programmer to use regular XHR requests which support better error handling than JSONP. On the other hand JSONP works on legacy browsers that do not have CORS support built into them. CORS is supported by most modern web browsers [2].