![]() Developers have used work-arounds such as JSONP, but Cross-Origin Resource Sharing (CORS) fixes this in a standard way.Įnabling CORS lets the server tell the browser it's permitted to use an additional origin. In other words, there are public resources that should be available for anyone to read, but the same-origin policy blocks that. For example, you want to retrieve JSON data from a different domain or load images from another site into a element. In a modern web application, an application often wants to get resources from a different origin. What if you wanted to get weather data from another country? ![]() ![]() This mechanism stops a malicious site from reading another site's data, but it also prevents legitimate uses. The browser's same-origin policy blocks reading a resource from a different origin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |