Over the
years, JavaScript and Web programming have grown tremendously seeing several
revisions and changes to suit modern day needs, yet the same origin policy
remains. The fundamental purpose of this policy is to prevent JavaScript
from making requests across domain boundaries, in the process instigating
various hacks for making cross-domain requests. Here’s where Cross-Origin
Resource Sharing (CORS) helps. Web administrators, server developers and
front-end developers are the likely lot who find this technology more useful
when they need to access resources across domains, servers, protocol or
port.
Additional HTTP headers are used to gain permission to access resources from a different domain server, protocol or port than the one from which the current document originated. It is to be noted that, modern browsers to mitigate any risks during cross-origin HTTP request use XMLHttpRequest or Fetch.
Cross Origin Domain XMLHttpRequest is detailly discussed here https://goo.gl/LRxSFv
Comments
Post a Comment