angular basics
Cross Domain Ajax
What is same origin policy?
Browsers allow a web page to make AJAX requests only with in the
same domain. Browser security prevents a web page from making
AJAX requests to another domain. This is called same origin policy.
URIs have the same origin
http://localhost:1234/api/employees
http://localhost:1234/Employees.html
Different origins: Because they have different port numbers
http://localhost:1234/api/employees
http://localhost:5678/Employees.html
Different origins: Because they have different domains
http://mahesh.com/api/employees
http://mahesh.net/Employees.html
What is same origin policy?
Browsers allow a web page to make AJAX requests only with in the
same domain. Browser security prevents a web page from making
AJAX requests to another domain. This is called same origin policy.
URIs have the same origin
http://localhost:1234/api/employees
http://localhost:1234/Employees.html
Different origins: Because they have different port numbers
http://localhost:1234/api/employees
http://localhost:5678/Employees.html
Different origins: Because they have different domains
http://mahesh.com/api/employees
http://mahesh.net/Employees.html
Comments
Post a Comment