---
schema_version: "1"
id: 94cf3ce6f164e9071ad666028462350eebd0b4bb7fa410d218de846afc68a2ec
title: Lightning Container Component Limits
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/container/container-limits.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/container-limits.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0f0fc79b66e854a2ca89d896bc7e9df26e59d02159bf07df756653fc22f86922
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# Lightning Container Component Limits

Understand the limits of `lightning:container`.

`lightning:container` has known limitations. You might observe performance and scrolling issues associated with the use of iframes. This component isn’t designed for the multi-page model, and it doesn’t integrate with browser navigation history.

If you navigate away from the page and a `lightning:container` component is on, the component doesn’t automatically remember its state. The content within the iframe doesn’t use the same offline and caching schemes as the rest of Lightning Experience.

Creating a Lightning app that loads a Lightning container static resource from another namespace is not supported. If you install a package, your apps should use the custom Lightning components published by that package, not their static resources directly. Any static resource you use as the `lightning:container` `src` attribute should have your own namespace.

Previous versions of `lightning:container` allowed developers to specify the Content Security Policy (CSP) of the iframed content. We removed this functionality for security reasons. The CSP level of all pages is now set to the highest level to provide the greatest security. Content can only be loaded from secure, approved domains. When `lightning:container` is used in Experience Cloud, the CSP setting in that Experience Builder site will be respected.

Apps that use `lightning:container` should work with data, not metadata. Don’t use the session key for your app to manage custom objects or fields. You can use the session key to create and update object records.

Content in `lightning:container` is served from the Lightning container domain and is available in Lightning Experience, Experience Builder sites, and the Salesforce mobile app. `lightning:container` can’t be used in Lightning pages that aren’t served from the Lightning domain, such as Visualforce pages or in external apps through Lightning Out.

**important:** You can’t access the Salesforce REST API from the app inside of` lightning:container`. See the [Spring ’18 Release Notes](https://help.salesforce.com/articleView?id=release-notes.rn_lc_api_revert_cruc.htm&release=212&type=5) for details.

-   **[Lightning Container Component Security Requirements](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-security.md)**  


    Ensure that your Lightning container components meet security requirements.


**See Also**  


-   [Lightning Container](https://developer.salesforce.com/docs/platform/aura-platform/guide/container-overview.md)
-   [*Salesforce Help:* Content Security Policy in Experience Builder Sites](https://help.salesforce.com/articleView?id=networks_security_csp_overview.htm&type=5)

