Avoid using the File Download Servlet to reference static resources

Impact area

Manageability

Severity

Medium

Affected element

Apex Page

Rule ID

SF-0135

Impact

Images should be included in APEX pages through static resources. Using the Download servlet url is less efficient from a performance point of view and is also typically associated with a hardcoded sysid.

Remediation

Use static resources to serve JavaScript files, as well as images, CSS, and other non-changing files. JavaScript and other assets served this way benefit from the caching and content distribution network (CDN) built into Salesforce.

Time to fix

30 min

What's here


Related content

Apex Page rules

Salesforce rules




Last modified on Jun 10, 2020