Skip to content

CSR-only SvelteKit route

Exporting ssr = false from +page.ts (or inside a <script> block in +page.svelte) disables server-side rendering for that entire route. Googlebot and AI crawlers receive an empty page with no content to index.

Remove the ssr = false export.

// +page.ts — before
export const ssr = false
// +page.ts — after: remove the export entirely
// If you need data, add a load function instead
import type { PageLoad } from './$types'
export const load: PageLoad = async ({ fetch, params }) => {
const data = await fetch(`/api/content/${params.slug}`).then(r => r.json())
return { data }
}

If you need browser-only behaviour inside the component, use browser from $app/environment or onMount rather than disabling SSR for the whole route.

<script lang="ts">
import { browser } from '$app/environment'
import { onMount } from 'svelte'
let chart: unknown
onMount(async () => {
const lib = await import('./chart-lib')
chart = lib.init()
})
</script>
{#if chart}
<!-- chart rendered here -->
{:else}
<p>Loading chart...</p>
{/if}
Terminal window
curl https://yourdomain.com/your-page | grep '<h1'

Confirm the response body contains actual content. Then re-run orino audit.