Static Resources in :- In our previous Salesforce developer tutorial we have clearly learned about different visualforce modular features. In this Salesforce Visualforce Tutorial we are going to learn about how to create static resources in

What is Static Resource in ?

In, Static resources are those which are used to store images, files, documents, pdf document, archived, Zip files, style sheets, JavaScript files and so on. All these files are uploaded to static resources in to use in visualforce pages as a reference.

When images or file is uploaded to static resource we have to enter name where these names are validated when visualforce page is compiled. When visualforce page is compiled it prevents in creating invalid static resources. We can upload maximum size of  file to static resources is 5MB for single static resource. We have maximum for static resources in is 250MB only.

 How to upload files to Static Resources in ?

To upload files or images to Static Resources in follow the steps given below.

Go to Develop=>Static Resources.

Creating Static Resources in

Click on Static resources as shown above.

Creating Static Resources in

Click on New button to create new Static resource in

Creating Static Resources in

  • Enter the name for the static resource. The name must not contain spaces, alphanumeric characters, must be unique, name must begin with letter.
  • Description is optional.
  • Click on Choose file button to upload images, files, documents to resources.
  • Select cache control as private.

We have two option in cache control value in Static resources they are private and public.

If cache control is Public :- When creating static resources in, Static resources data cached on server will be shared to other user in our organization. It has no security and can be used by any user in an organization.

If cache control is Public :- If cache control is selected as private no Static Resource image are filed is shared with users in an organization. We have set cache control as private only.

How to use static resources in salesforce :- Get full details on Static resources.