Visualforce Page Code Examples
Visualforce Considerations
Lightning Component Code Examples
Canvas Limits
Previous Versions
In addition to standard canvas apps, Canvas also lets you expose a canvas app on a Visualforce page. This means you can display a canvas app anywhere you can display a Visualforce page.
Developers can use Visualforce pages to:
To host a canvas app on a Visualforce page, use the <apex:canvasApp> component.
The Canvas framework includes methods that you can use to circumvent the navigational limitations of the iframe that contains a canvas app, without using Visualforce pages. These methods offer a streamlined alternative for controlling navigation to or from canvas apps in the Salesforce app. For details, see Salesforce Mobile App Navigation Methods for Use with Canvas Apps.
Note
Canvas apps embedded in Visualforce using <apex:canvasApp> serialize parameters as part of a redirect URL during load. If the combined size of parameters exceeds 8KB, this may cause the redirect to fail with a 500 Internal Server Error. This is due to a header size limit.
To avoid the header size limit issue:
Pass only small tokens or ID’s via parameters.
Let your Canvas app fetch large payloads server-side.
Consider using signedRequest mode, which avoids redirects and uses POSTS.
Visualforce Page Code Examples
You can display a canvas app on a Visualforce page in a number of ways.
Use this component to display a canvas app on a Visualforce page. The table below lists the component attributes.
See Also