Svelte · Junior · Question 53 of 76
What is the difference between +page.js and +page.server.js?
- ✓Correct answer:
+page.server.jsruns only on the server (can use databases and secrets);+page.jsruns on the server and in the browser - 2
+page.jsruns only in the browser - 3They are the same; the name is a convention
Explanation
A universal load in +page.js runs during SSR and then in the browser on client-side navigation.