Loading
Upcoming Mandatory Changes to Public Key Infrastructure (PKI)Read More
Explore Legacy Service Features
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create Embedded Static Resources

          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
          Important
          Important

          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.

          Note
          Note The Lightning Platform manages and distributes the static resources, acting as a content distribution network. Caching and distribution are handled automatically.

          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:

          1. From Setup, in the Quick Find box, enter Static Resources, then select Static Resources.
          2. Click New.
          3. 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.
          4. In the Description text area, specify an optional description of the resource.
          5. To navigate to a local copy of the resource that you want to upload, click Browse next to File.
            Note
            Note A single static resource file is up to 5 MB, and an organization can have up to 250 MB of total static resources.
          6. 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.
          7. To apply the resources, return to your code settings in Channel Menu or Experience sites.
            Tip
            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.
          Important
          Important If you change your Channel Menu setup, the results can take up to 10 minutes to appear for the first time on your website due to caching.
          Note
          Note For Chat website pages, see Customize an Automated Invitation.
          • 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.
           
          Loading
          Salesforce Help | Article