---
schema_version: "1"
id: cdcc746d9b0f6b584e5073643f7f02f6daee54f6df4d3f94a9d22b0d5f7f2b53
title: Define Static Resources
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/pages_static_resources_create.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.pages_static_resources_create.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: fa7bea6312cb54d74bc11a95da8195fb67184eb22ebce1a142737eec8db8c5b0
description: You can use static resources to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files. You can use static resources only within your org, so you can’t host content here for other apps or websites.
products:
  - Salesforce Platform
release: "264"
---
# Define Static Resources

You can use static resources to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files. You can use static resources only within your org, so you can’t host content here for other apps or websites.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Contact Manager</strong>, <strong>Group</strong>, <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d29770e82">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d29770e82 ">To create static resources:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d29770e82 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

1. From Setup, in the Quick Find box, enter Static Resources, and then select **Static Resources**.
2. To create a static resource, click **New**.
3. Enter a name that identifies the resource in Visualforce markup.
    
    This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)
    
    Note If you reference a static resource in Visualforce markup and then change the name of the resource, the Visualforce markup is updated to reflect that change.
4. If needed, specify a description for the static resource.
5. To upload a static resource, click **Browse** and then select a local file.
    
    A single static resource can be up to 5 MB, and an org can have up to 250 MB of static resources, total.
    
    ![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_warning.png)
    
    Warning If you use WinZip to compress static resource files, you must install the most recent version. Older versions of WinZip can cause a loss of data.
6. Set the cache control for user sessions, including API and Experience Cloud user sessions.
    
    If set to private, the static resource is accessible to all authenticated users. The static resource is stored on the Salesforce server in a user’s individual cache for the duration of the session.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_code-264-0-0-production-enus/789bc523-706b-4ae4-8fe9-be6322e38b6b/images/icon_note.png)
    
    Note If a Salesforce Site has guest user profile restrictions based on IP range or login hours, the cache control for static resources is set to private. A Salesforce Site with guest user profile restrictions caches static resources only within the browser. If a previously unrestricted Salesforce Site becomes restricted, it can take up to 45 days for the static resources to expire from the Salesforce cache and any intermediate caches.
    
    If set to public, the static resource is accessible to all internet traffic, including unauthenticated users, after it’s cached. The resource is stored on the Salesforce server in a shared cache, which results in faster load times.
    
    For technical information about cache control, see the W3C specifications for [HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html).
7. Save your changes.

#### See Also

- [View and Edit Static Resources](https://help.salesforce.com/s/articleView?id=platform.pages_static_resources_edit.htm&release=264.0.0&type=5 "Edit, delete, and clone static resources.")
- [Static Resources](https://help.salesforce.com/s/articleView?id=platform.pages_static_resources.htm&release=264.0.0&type=5 "Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files. Static resources can be used only within your Salesforce org, so you can’t host content here for other apps or websites.")
- [_Object Reference for the Salesforce Platform_: StaticResource](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_staticresource.htm)