System Design · Middle · Question 31 of 75

Why are third-party scripts (analytics, chats, ads) dangerous for performance?

Explanation

Third-party code can be heavy and is outside your control. Load it asynchronously and deferred (next/script with the lazyOnload strategy), use facades (a preview instead of the widget), move it to workers (Partytown), set a budget.

Further reading

Problem with a question

System Design · Middle · question 31

Test yourself

Take the System Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz