Skip to content

Commit d58587f

Browse files
authored
docs: clarify async behavior and default script attributes (#390)
1 parent 4ec38e5 commit d58587f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/content/docs/1.guides/0.key-concepts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ to the hydration process. Instead, scripts are loaded by default when Nuxt is fu
3939

4040
You can change this behavior by modifying the [defaultScriptOptions](/docs/api/nuxt-config#defaultscriptoptions).
4141

42-
Nuxt Scripts will also insert several extra tags to the script element to help with performance and privacy.
42+
Nuxt Scripts will also insert several extra tags to the `<script>` element to optimize performance and privacy.
4343
- `async` - Scripts are loaded asynchronously to prevent blocking the rendering of the page.
4444
- `defer` - Scripts are deferred to ensure they are executed in the order they are loaded.
4545
- `crossorigin="anonymous"` - Scripts are loaded with the `anonymous` attribute to prevent them from accessing cookies.
4646
- `referrerpolicy="no-referrer"` - Scripts are loaded with the `no-referrer` policy to prevent them from sending the referrer header.
47+
- `fetchpriority="low"` - Scripts are loaded with lower priority to improve page performance.
4748

49+
> **Note:** `async` is not applied by default because `defer` is used. If you need `async`, you can explicitly disable `defer`.
4850
4951
## Understanding proxied functions
5052

0 commit comments

Comments
 (0)