You are here:
Create Embedded Static Resources
Create and upload JavaScript files to Salesforce as static resources and then apply them to your website or Experience Builder site. With static resources, you can change one or many pages with a few clicks in code settings on existing deployments.
Required Editions
| View supported editions. |
| User Permissions Needed | |
|---|---|
| To create and edit static resources: | Customize Application AND Author Apex |
Legacy Chat will be retired on February 14, 2026. To avoid service interruptions to your end users, switch to enhanced Chat (formerly Messaging for In-App and Web). Enhanced Chat offers many of the legacy Chat features that you love plus asynchronous conversations that can be picked back up at any time. Learn about migrating in Help and Trailhead.
Create your JavaScript static resource files, including strings, arrays, JSON, and JS functions. Here are some examples to get you started:
Then upload JavaScript files to reference in your Channel Menu Experience site or Channel Menu external website deployment. Add files for Embedded Chat to Experience sites only (not available for website pages).
Here are the steps to add your resources:
- From Setup, in the Quick Find box, enter Static Resources, then select Static Resources.
- Click New.
-
To identify the resource in Visualforce markup, enter text in the Name box. Use this
static resource name, not the file name, for reference later in code settings.
Create a name that’s unique in your org, and provide a different name for each static resource. Start with a letter, use alphanumeric characters, and no spaces. Don’t end with an underscore or add two consecutive underscores.
- In the Description text area, specify an optional description of the resource.
-
To navigate to a local copy of the resource that you want to upload, click
Browse next to File.
Note A single static resource file is up to 5 MB, and an organization can have up to 250 MB of total static resources. - Set the Cache Control to Public. Share the static resource data on the Salesforce server with other users in your organization for faster load times.
-
To apply the resources, return to your code settings in Channel Menu or Experience sites.
Tip If you make changes, you can reupload static resources without changing your code settings name in setup or in the code snippet and property builder.
- Experience Site Static Resource Files
Create JavaScript files to upload as a static resource and apply to Embedded Chat for your Experience Cloud site. Here’s a code example for chat invitations to get you started.

