CORS with the API
This topic specifically discusses CORS (Cross Origin Resource Sharing). Additional information on working with proxies can be found in the proxies guide topic.
- Provide a performance boost since the web application no longer has to send a request back to its server, wait for the server to access the desired resource, and interpret the result before sending it back to the client.
- Simplify development as it is no longer necessary to maintain a proxy page on your server.
To support CORS, web servers must be pre-configured for it and browsers must be able to support it. For additional details on enabling this in a web server, please visit enable-cors.org.
- Be on the same domain as the application, or
- Be hosted on a server that supports CORS, or
- Use a proxy.
Requests will always be made with the assumption that CORS is supported. If your server doesn't yet support CORS, you can enable a proxy rule.
Please note that prior to version 10.1, ArcGIS Server services were not enabled for CORS. If needing to work with older versions of ArcGIS Server, you will need to make a request to the service via a proxy.