Question: 1 / 335

What is the preferred way to reference web content in Visualforce pages?

Access from Chatter Files

Upload in the Documents tab

Access from a third-party CDN

Upload as Static Resource

The preferred way to reference web content in Visualforce pages is to upload it as a Static Resource. This option provides several significant advantages that enhance performance and security.

When assets are uploaded as Static Resources, they are stored in Salesforce’s secure environment, ensuring that they are easily accessible, manageable, and version-controlled. This means that you can change or update the files without altering the URLs used in your Visualforce pages. The files are compressed and served with optimal performance, which can help with loading times and resource management.

Static Resources also allow for better organization of files rather than scattering them across different locations such as Chatter Files or Documents, which may not be ideal for web assets. Utilizing a third-party CDN could improve performance, but it introduces potential security risks and complications related to managing external dependencies. Additionally, external storage solutions might not integrate as smoothly with Salesforce features like caching.

Overall, Static Resources are specifically designed for the needs of Salesforce applications, making them the recommended choice for referencing web content in Visualforce pages.

Next

Report this question