Jump to content

Cross-origin resource sharing

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Easyas12c (talk | contribs) at 12:25, 15 June 2010. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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].


References