Avoid importing css and javascript files from sources other than static resources

Impact area

Performance

Severity

Medium

Affected element

Apex Page

Rule ID

SF-0132

Impact

Inefficient delivery of page components to the client can result in slow page load times.

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

References

See the Salesforce documentation article: Visualforce Performance: Best Practices > Optimizing JavaScript.

What's here


Related content

Apex Page rules

Salesforce rules




Last modified on Jun 10, 2020