Performance · Nuxt Skew Protection · Nuxt SEO

[NuxtSEO Pro](https://nuxtseo.com/ "Home")

- [Modules](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Tools](https://nuxtseo.com/tools)
- [Pro](https://nuxtseo.com/pro)
- [Learn SEO](https://nuxtseo.com/learn-seo/nuxt) [Releases](https://nuxtseo.com/releases)

[Sign In](https://nuxtseo.com/auth/github)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

[User Guides](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)

[API](https://nuxtseo.com/docs/skew-protection/api/use-skew-protection)

[Releases](https://nuxtseo.com/docs/skew-protection/releases/v1)

Skew Protection

- [Switch to Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [Switch to Nuxt SEO](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Switch to Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Switch to Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [Switch to OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Switch to Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Switch to Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [Switch to SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Switch to Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Switch to AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

Search…```k`` /`

v1.1.1

- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Getting Started

- [Introduction](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [Installation](https://nuxtseo.com/docs/skew-protection/getting-started/installation)

### Core Concepts

- [Check for Update Strategy](https://nuxtseo.com/docs/skew-protection/guides/update-strategies)
- [Update Notifications](https://nuxtseo.com/docs/skew-protection/guides/immediate-updates)
- [Performance](https://nuxtseo.com/docs/skew-protection/guides/performance)
- [Persistent Storage](https://nuxtseo.com/docs/skew-protection/guides/storage-configuration)
- [Notification UI](https://nuxtseo.com/docs/skew-protection/guides/ui-examples)
- [Cookie Consent](https://nuxtseo.com/docs/skew-protection/guides/cookie-consent)
- [View Active Connections](https://nuxtseo.com/docs/skew-protection/guides/live-connections)
- [Tracking User Pages](https://nuxtseo.com/docs/skew-protection/guides/route-tracking)

### Providers

- [External Providers](https://nuxtseo.com/docs/skew-protection/providers/external)
- [Cloudflare](https://nuxtseo.com/docs/skew-protection/providers/cloudflare)

Core Concepts

# Performance

[Copy for LLMs](https://nuxtseo.com/docs/skew-protection/guides/performance.md)

## [Connection Overhead](#connection-overhead)

SSE and [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) strategies maintain persistent connections to your server. For **small to medium applications** (under 10,000 concurrent users), this is typically fine - modern servers handle thousands of idle connections efficiently.

For **high-traffic applications** (10,000+ concurrent users), use an [Adapter](https://nuxtseo.com/docs/skew-protection/guides/update-strategies#adapter) with [Ably](https://nuxtseo.com/docs/skew-protection/providers/external#ably) or [Pusher](https://nuxtseo.com/docs/skew-protection/providers/external#pusher). These services handle millions of concurrent connections and include automatic reconnection, global edge distribution, and connection multiplexing.

## [Selective Route Protection](#selective-route-protection)

The module does **not establish connections until** [`<SkewNotification>`](https://nuxtseo.com/docs/skew-protection/api/skew-notification) or [`useSkewProtection()`](https://nuxtseo.com/docs/skew-protection/api/use-skew-protection) mounts. The plugin only sets up infrastructure; actual SSE/WebSocket connections happen when a component using skew protection mounts.

This means you can control exactly when the module creates connections by placing `<SkewNotification>` only on specific pages.

Once connected, the connection persists for the session (even when navigating away from the page). This is intentional - once you're listening for updates, you keep listening. Use [`disconnect()`](https://nuxtseo.com/docs/skew-protection/api/use-skew-protection#disconnect) if you need to close it manually.

### [Page-Specific Protection](#page-specific-protection)

Add `<SkewNotification>` or `useSkewProtection()` only where needed:

pages/dashboard.vue

```
<script setup lang="ts">
const skew = useSkewProtection()

skew.onAppOutdated(() => {
  // handle update
})
</script>
```

pages/admin.vue

```
<template>
  <div>
    <SkewNotification v-slot="{ isAppOutdated, reload }">
      <button v-if="isAppOutdated" @click="reload">
        Update available
      </button>
    </SkewNotification>
    <!-- page content -->
  </div>
</template>
```

### [Route-Based Logic](#route-based-logic)

Use route middleware or conditional rendering for more control:

layouts/default.vue

```
<script setup lang="ts">
const route = useRoute()

const protectedRoutes = ['/dashboard', '/admin', '/settings']
const shouldProtect = computed(() =>
  protectedRoutes.some(r => route.path.startsWith(r))
)
</script>

<template>
  <div>
    <SkewNotification v-if="shouldProtect" v-slot="{ isAppOutdated, reload }">
      <button v-if="isAppOutdated" @click="reload">
        Update available
      </button>
    </SkewNotification>
    <slot />
  </div>
</template>
```

This reduces active connections to only users on protected routes.

### [Lazy Connection Mode](#lazy-connection-mode)

For fine-grained control, use [`lazy: true`](https://nuxtseo.com/docs/skew-protection/api/use-skew-protection#lazy) to prevent auto-connect and manually control when connections are established:

pages/checkout.vue

```
<script setup lang="ts">
const skew = useSkewProtection({ lazy: true })

// Only connect after user starts checkout
function startCheckout() {
  skew.connect()
  // proceed with checkout...
}

// Disconnect when done
onBeforeRouteLeave(() => {
  skew.disconnect()
})
</script>
```

This is useful when you want connections only during specific user flows rather than entire pages.

## [Bot Traffic Filtering](#bot-traffic-filtering)

The module automatically excludes bot and crawler traffic from SSE/WebSocket connections when you install `@nuxtjs/robots`. This prevents bots from inflating connection counts and wasting server resources.

### [Setup](#setup)

Install `@nuxtjs/robots` as a peer dependency:

```
npx nuxi module add @nuxtjs/robots
```

The module uses `useBotDetection()` from `@nuxtjs/robots` to detect bot user agents (Googlebot, Bingbot, etc.) and skip establishing real-time connections for them.

### [How It Works](#how-it-works)

When a bot visits your site:

1. `useBotDetection()` identifies the bot via user agent
2. The SSE/WebSocket connection is skipped entirely
3. No server resources are consumed for bot traffic
4. Bot visits are excluded from [`useActiveConnections()`](https://nuxtseo.com/docs/skew-protection/api/use-active-connections) stats

This is automatic - zero-config beyond installing `@nuxtjs/robots`.

[Edit this page](https://github.com/nuxt-seo-pro/nuxt-skew-protection/edit/main/docs/content/2.guides/2.performance.md)

[Markdown For LLMs](https://nuxtseo.com/docs/skew-protection/guides/performance.md)

Did this page help you?

[Update Notifications React to version updates using useSkewProtection() composable.](https://nuxtseo.com/docs/skew-protection/guides/immediate-updates) [Persistent Storage Configure persistent storage for build assets across deployments.](https://nuxtseo.com/docs/skew-protection/guides/storage-configuration)

On this page

- [Connection Overhead](#connection-overhead)
- [Selective Route Protection](#selective-route-protection)
- [Bot Traffic Filtering](#bot-traffic-filtering)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

### [NuxtSEO](https://nuxtseo.com/ "Home")

- [Getting Started](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [MCP](https://nuxtseo.com/docs/nuxt-seo/guides/mcp)

Modules

- [Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

### [NuxtSEO Pro](https://nuxtseo.com/pro "Nuxt SEO Pro")

- [Getting Started](https://nuxtseo.com/pro)
- [Dashboard](https://nuxtseo.com/pro/dashboard)
- [Pro MCP](https://nuxtseo.com/pro/docs/getting-started/mcp-setup)

### [Learn SEO](https://nuxtseo.com/learn-seo "Learn SEO")

Nuxt

- [Mastering Meta](https://nuxtseo.com/learn-seo/nuxt/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers)
- [Launch & Listen](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen)
- [Routes & Rendering](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering)
- [Staying Secure](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/security)

Vue

- [Vue SEO Guide](https://nuxtseo.com/learn-seo/vue)
- [Mastering Meta](https://nuxtseo.com/learn-seo/vue/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/vue/controlling-crawlers)
- [SPA SEO](https://nuxtseo.com/learn-seo/vue/spa)
- [SSR Frameworks](https://nuxtseo.com/learn-seo/vue/ssr-frameworks)
- [SEO Checklist](https://nuxtseo.com/learn-seo/checklist)
- [Pre-Launch Warmup](https://nuxtseo.com/learn-seo/pre-launch-warmup)
- [Backlinks & Authority](https://nuxtseo.com/learn-seo/backlinks)

### [Tools](https://nuxtseo.com/tools "SEO Tools")

- [Social Share Debugger](https://nuxtseo.com/tools/social-share-debugger)
- [Robots.txt Generator](https://nuxtseo.com/tools/robots-txt-generator)
- [Meta Tag Checker](https://nuxtseo.com/tools/meta-tag-checker)
- [HTML to Markdown](https://nuxtseo.com/tools/html-to-markdown)
- [XML Sitemap Validator](https://nuxtseo.com/tools/xml-sitemap-validator)
- [Schema.org Validator](https://nuxtseo.com/tools/schema-validator)
- [Keyword Idea Generator](https://nuxtseo.com/tools/keyword-generator)
- [Keyword Research](https://nuxtseo.com/tools/keyword-research)
- [SERP Analyzer](https://nuxtseo.com/tools/serp-analyzer)
- [Domain Rankings](https://nuxtseo.com/tools/domain-rankings)

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)