Skip to main content
Optimized loading of resources

Make sure any inclusion of static resources such as scripts or stylesheets leverage the appropriate built-in optimizations.

Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Rationale

Embedding scripts or other resources statically is strongly discouraged. As a best practice  developers should use the apex:includeScript or ltng:require statements to leverage built-in optimisations. This also ensures multiple references to the same script are de-duplicated, making components safe to combine components.

Scope

  • Visualforce pages

  • Visualforce components

  • Lightning components

Did this answer your question?