Responsible JavaScript

Responsible JavaScript

Jeremy Wagner

When you preload assets, you’re effectively boosting their priority; if everything is prioritized, then nothing is. Where preload and JavaScript is concerned, you should only use it for first-party scripts that are critical to rendering—and that’s only if you can’t find a way to take such JavaScript out of the critical path and serve contentful markup directly from the server. In any case, squandering preloads on third-party scripts siphons away available bandwidth from scripts that power critical user-experience fixtures.
3529-3534