PDII practice question 8 of 10

Universal Containers develops a Visualforce page that requires the inclusion of external JavaScript and C55 files. They want to ensure efficient loading and caching of the page. Which feature should be utilized to achieve this goal?

Full set: 198 questions
Answer options
A: ActionFunction
B: PageBlockTable
C: Static resources Correct answer
D: RemoteAction
Correct Answer:
C. Static resources
Explanation

Static resources allow developers to upload and manage static content such as JavaScript libraries, CSS stylesheets, images, and fonts securely within Salesforce. Using static resources to include these external files in a Visualforce page enables the Salesforce platform to cache the files via its native Content Delivery Network (CDN). This caching significantly reduces page load times and bandwidth consumption because the files are served from edge servers closest to the user rather than dynamically processing them on the application server for each request. Additionally, referencing static resources using the {!$Resource.ResourceName} merge syntax guarantees that the links generated are always valid and secure, eliminating broken references when Salesforce updates standard platform URLs.

Why Incorrect

Option A: ActionFunction is a Visualforce component used to invoke a server-side Apex controller method directly from client-side JavaScript asynchronously; it has no role in caching external files.
Option B: PageBlockTable is an iteration component used to render tabular data grids in the Visualforce UI; it does not handle importing, caching, or managing external web assets.
Option D: RemoteAction is an annotation used for invoking server-side Apex methods from client-side JavaScript via JavaScript Remoting; it is not utilized for loading or caching file assets.

References

Salesforce Visualforce Developer Guide: "Using Static Resources", Section: Working with Static Resources.

Salesforce Visualforce Developer Guide: "Best Practices for Improving Visualforce Performance", Section: Performance and Best Practices.

Scroll to Top