Javascript in Phoenix templates

And defer seems to be well supported these days.

The problem with a plain or async head script is that it delays FCP (first contentful paint).

You still have to be careful in some situations:

Use async or defer