Skip to main content

Optimized loading of resources

David Martin avatar
Written by David Martin
Updated this week

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?