Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Salesforce Developer
easy

What is a Static Resource and when do you use one?

A Static Resource is a file (image, JS library, CSS, ZIP) uploaded to Salesforce and accessible at a stable URL. Used to deliver static assets to Visualforce, Lightning components, Email Templates, and Communities.

How to add: Setup -> Static Resources -> New. Upload up to 5 MB per resource. Reference via URLFOR($Resource.MyLogo) in Visualforce, or import LOGO from '@salesforce/resourceUrl/MyLogo' in LWC.

ZIP support: upload a ZIP and reference individual paths inside. Useful for shipping a directory of related assets.

Common uses: company logos, JS libraries (jQuery, D3.js), CSS frameworks, PDF templates, audio/video.

Cache semantics: aggressively cached. Updating a resource keeps the same URL — browsers may serve the cached version. Workaround: bump a version field in the path, or cache-bust with a query string.

Alternative: third-party CDN hosting (S3, CloudFront) for performance-critical or frequently-updated assets.

Why this answer works

Foundational. The cache-busting tip is a senior signal — anyone who has updated a Static Resource has hit it.

Follow-ups to expect

Related dictionary terms