# Defer Non-Critical Scripts

Use `defer` and `async` attributes to prevent scripts from blocking rendering.

```liquid
{% comment %} Defer for scripts that need DOM ready {% endcomment %}
<script src="{{ 'analytics.js' | asset_url }}" defer></script>

{% comment %} Async for independent scripts {% endcomment %}
<script src="{{ 'widget.js' | asset_url }}" async></script>
```

Never use bare `<script>` tags without `defer` or `async` unless the script must block (e.g. critical polyfills).
