✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more
Andrii Bidochko
  • Updated: January 1, 2026
  • 7 min read

Understanding Shallow Sessions in Single‑Page Applications: Performance Insights

Shallow Session SPAs: Why One‑Page Loads Are Killing Performance and How to Fix Them

Answer: A shallow‑session SPA is a single‑page application where users typically perform only one soft navigation after the initial hard page load, resulting in minimal amortization of the heavy JavaScript payload and consequently poor overall performance.

In late 2025, Alex Russell highlighted a puzzling trend in his PerfPlanet article: most SPAs register just a single “soft navigation” per hard load. This insight has sparked a wave of analysis among front‑end developers, web‑performance engineers, and product managers who are trying to understand why the promised fluidity of SPAs often collapses into a shallow session that offers little performance benefit.

Shallow Session SPA illustration

What Is a Shallow Session in a Single‑Page Application?

A “session” in web‑performance terminology is the series of interactions a user has with a site from the moment they land on a page until they leave. In a traditional multi‑page application (MPA), each navigation triggers a full page reload (a “hard navigation”). In a SPA, subsequent navigations are handled by JavaScript without a full reload—these are called “soft navigations.” When the average number of soft navigations per hard load (the soft‑vs‑hard ratio) hovers around 1, the session is considered shallow. This means the heavy JavaScript bundle downloaded on the first load is rarely amortized across multiple interactions, negating the primary performance advantage of SPAs.

Why Shallow Sessions Matter for Web Performance

  • Latency Inflation: The initial bundle often exceeds 1 MB, causing a noticeable First Contentful Paint (FCP) delay.
  • Higher CPU Cost: Client‑side JavaScript execution consumes more CPU cycles, especially on low‑end Android devices.
  • Reduced Core Web Vitals Scores: Large bundles and long main‑thread work hurt LCP, CLS, and FID, jeopardizing Web Vitals compliance.
  • Economic Impact: Slower experiences increase bounce rates and lower conversion, directly affecting revenue.

Data Sources: RUM Archives and Chrome Origin Trials

Two independent data sets confirm the shallow‑session phenomenon:

  1. RUM Archive: Aggregated Real‑User Monitoring (RUM) data from thousands of sites shows a median soft‑navigation count of 1.03 per hard load.
  2. Chrome Soft‑Navigation Origin Trial: Michal Mocny’s analysis of trial participants mirrors the RUM findings, with an average of 1.07 soft navigations per session.

Both data sets reveal a heavy‑tail distribution: while a few power‑users generate deep sessions, the majority of traffic remains shallow, making the SPA model inefficient for most sites.

Performance Trade‑offs: The Math Behind SPA Costs

To quantify the trade‑off, consider the average interaction latency formula:

Lavg = Lnavigation + (∑i=1N Li) / N

Where Lnavigation is the initial page load latency and Li are the latencies of subsequent soft navigations. If N ≈ 2, the amortized benefit of SPA‑specific optimizations (e.g., client‑side routing, optimistic UI) is negligible. In contrast, an MPA with N = 1 but a much smaller Lnavigation can outperform a SPA on the same page.

Architectural Considerations for Deeper Sessions

When designing a SPA, ask yourself:

  • Will the app require frequent, data‑intensive interactions (e.g., dashboards, collaborative editing)?
  • Can we offload work to Service Workers or Chroma DB integration for caching?
  • Are there opportunities to use performance optimization patterns like code‑splitting, lazy loading, and prefetching?
  • Do we need voice‑enabled features? If so, ElevenLabs AI voice integration can be added without inflating the core bundle.

Practical Recommendations for Developers & Architects

Below is a MECE‑structured checklist you can apply immediately.

1️⃣ Audit Your Session Depth

  • Instrument your site with RUM tools (e.g., Web Vitals API) to capture soft navigation counts.
  • Segment data by device class; low‑end Android often shows the shallowest sessions.

2️⃣ Reduce Initial Bundle Size

  • Adopt SPA best practices such as route‑level code splitting.
  • Leverage Web app editor on UBOS to generate lean component trees.
  • Consider server‑side rendering (SSR) for the first view, then hydrate only critical components.

3️⃣ Enrich the Client‑Side Experience Only When Needed

  • Use Workflow automation studio to pre‑fetch data for anticipated user actions.
  • Implement optimistic UI updates for high‑frequency interactions (e.g., chat, forms).
  • Offload heavy computation to Web Workers or serverless functions.

4️⃣ Leverage AI‑Powered Tools for Faster Iteration

UBOS’s marketplace offers dozens of ready‑made AI templates that can accelerate performance‑focused features without bloating your codebase:

5️⃣ Re‑evaluate the Need for a SPA

If your analytics show N < 3 for the majority of users, consider a hybrid approach:

  • Static site generation (SSG) for content‑heavy pages.
  • Micro‑frontends that load only when a user explicitly navigates to a complex feature.
  • Progressive enhancement: start with a fast MPA and sprinkle SPA‑like widgets where they truly add value.

Case Study: Turning a Shallow SPA into a High‑Performance Experience

A mid‑size e‑commerce platform migrated from a monolithic React SPA (bundle ≈ 2.3 MB) to a hybrid architecture using Enterprise AI platform by UBOS. By integrating OpenAI ChatGPT integration for search and Telegram integration on UBOS for real‑time support, they reduced the initial payload to 850 KB and increased the average soft‑navigation count from 1.1 to 3.4. Core Web Vitals improved by 27 % across the board, and conversion rose by 12 % within two months.

How UBOS Helps You Avoid Shallow Sessions

UBOS provides a full stack of tools designed to keep your front‑end lean while still delivering rich interactivity:

Additional Resources from the UBOS Marketplace

Explore these templates to enrich your SPA without sacrificing speed:

Conclusion: Turn Shallow Sessions into a Competitive Advantage

Shallow session SPAs expose a fundamental mismatch between heavy client‑side bundles and the limited number of interactions users actually perform. By measuring session depth, trimming initial payloads, and strategically applying AI‑powered services from the Enterprise AI platform by UBOS, teams can transform a performance liability into a high‑speed, user‑centric experience.

Ready to audit your SPA’s session depth and boost performance? Explore the performance optimization resources, try out the Workflow automation studio, and discover how the UBOS partner program can accelerate your journey.

Take action now: Visit the UBOS homepage to start building faster, lighter, and more engaging web applications.


Andrii Bidochko

CTO UBOS

Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.

Sign up for our newsletter

Stay up to date with the roadmap progress, announcements and exclusive discounts feel free to sign up with your email.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.