Newer Version Available
Using Static Resources
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.
Using a static resource is preferable to uploading a file to the
Documents tab because:
- You can package a collection of related files into a directory hierarchy and upload that hierarchy as a .zip or .jar archive.
- You can reference a static resource by name in page markup by using the $Resource global variable instead of hard coding document IDs.
A single static resource can be up to 5 MB in size, and an organization can have up to 250 MB of static resources, total.