---
schema_version: "1"
id: 397d9e417cc9de471d1db24f30793075c87585e0accf71afc41879ff408b26c9
title: Cross-Domain XHR
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/canvas-framework/guides/platform-connect/using/canvas-app-xhr-intro.md
canonical_url: https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-app-xhr-intro.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 297514ed4417c8467d7efcbd250fa4b04f1709b90867b7e76796420dea47e96e
products:
  - Canvas Developer Guide
  - Platform Developer Content
---

# Cross-Domain XHR

Canvas apps are loaded on a Salesforce page in an iFrame. The Canvas app has its own domain and can't make XML HTTP request (XHR) calls back to the \*.salesforce.com domain. You can develop and deploy your own proxies as part of the SDK, however, Canvas provides a client-side proxy written in JavaScript. This proxy enables client-side XHR calls back to Salesforce.

**important:** To prepare your Canvas apps for the new web browser restrictions on third-party cookies, see [How Third-Party Cookie Restrictions Impact Salesforce Canvas Apps](https://help.salesforce.com/s/articleView?id=002192971&type=1) in Salesforce Help.

If you use this proxy from the client to make an XHR request, the API forwards the request to the outer iFrame and the request is submitted on your behalf. When the request is complete, the SDK calls the client’s callback function with the results. Here are some examples of how you can make XHR calls:

-   [Getting a List of Chatter Users](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-app-xhr-code-example-list-of-chatter-users.md)
-   [Posting to a Chatter Feed](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-app-xhr-code-example-posting-to-chatter-feed.md)

**note:** The SDK supports cross-domain XHR calls, however, it shouldn’t be used to make same-domain calls.

-   **[Getting a List of Chatter Users](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-app-xhr-code-example-list-of-chatter-users.md)**  

-   **[Posting to a Chatter Feed](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-app-xhr-code-example-posting-to-chatter-feed.md)**  


**See Also**  


-   [Canvas SDK](https://developer.salesforce.com/docs/platform/canvas-framework/guide/canvas-framework-using-sdk.md)

