Server-Side Rendering (SSR)

This page is rendered on the server for each request (SvelteKit's default)

Server Time

2026-01-15T18:54:25.166Z

This data was fetched on the server

How It Works

1. Request comes to the server

2. +page.server.ts load function runs

3. SvelteKit renders the page with data

4. HTML is sent to the client

5. Client hydrates for interactivity

Code Example

// +page.server.ts
export function load() {
  return {
    serverTime: new Date().toISOString(),
    message: "This data was fetched on the server",
  };
}