nerdexam
Salesforce

PDI · Question #160

What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components? Choose 3 answers

The correct answer is B. One-time loading for duplicate scripts C. Specifying loading order D. Loading scripts In parallel. The <ltng:require> tag in Aura components offers capabilities such as preventing duplicate script loading, enforcing a specific script execution order, and enabling parallel script loading for efficiency.

Submitted by stefanr· Apr 18, 2026User Interface

Question

What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components? Choose 3 answers

Options

  • ALoading files from Documents
  • BOne-time loading for duplicate scripts
  • CSpecifying loading order
  • DLoading scripts In parallel
  • ELoading externally hosted scripts

How the community answered

(48 responses)
  • A
    2% (1)
  • B
    94% (45)
  • E
    4% (2)

Why each option

The `<ltng:require>` tag in Aura components offers capabilities such as preventing duplicate script loading, enforcing a specific script execution order, and enabling parallel script loading for efficiency.

ALoading files from Documents

The `<ltng:require>` tag loads JavaScript resources from Salesforce Static Resources, not from the Salesforce Documents object.

BOne-time loading for duplicate scriptsCorrect

The `<ltng:require>` tag ensures that JavaScript files are loaded only once per page, even if requested multiple times, which prevents redundant downloads and potential conflicts.

CSpecifying loading orderCorrect

Developers can specify the loading and execution order of dependent scripts using the `afterRender` attribute within `<ltng:require>`, which is critical for managing script dependencies.

DLoading scripts In parallelCorrect

The tag facilitates loading multiple JavaScript files in parallel, optimizing component load times by fetching resources concurrently.

ELoading externally hosted scripts

The `<ltng:require>` tag is designed for loading JavaScript from Salesforce Static Resources and does not directly support loading externally hosted scripts for security and performance reasons.

Concept tested: `<ltng:require>` tag capabilities in Aura components.

Source: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_client_side_loading_external.htm

Topics

#Aura Components#JavaScript Loading#ltng:require tag#Client-side Scripting

Community Discussion

No community discussion yet for this question.

Full PDI Practice