What is the primary purpose of the ‘defer’ attribute when loading an external JavaScript file?
Key points
- Defer preserves script execution order
- Defer waits for DOMContentLoaded
- Async executes as soon as the script downloads
Ready to go further?
Key points
Ready to go further?