Svelte · Senior · Question 71 of 75

Why might a SvelteKit page with heavy +layout.server.js data hurt navigation speed?

Explanation

Reading url.pathname or url.searchParams in a layout load makes it a dependency, so it re-runs on related navigations.

Further reading

Problem with a question

Svelte · Senior · question 71

Test yourself

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

Take this quiz