- 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.

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:
- RUM Archive: Aggregated Real‑User Monitoring (RUM) data from thousands of sites shows a median soft‑navigation count of
1.03per hard load. - Chrome Soft‑Navigation Origin Trial: Michal Mocny’s analysis of trial participants mirrors the RUM findings, with an average of
1.07soft 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:
- AI SEO Analyzer – automatically audits page weight and suggests splits.
- AI Article Copywriter – generates lightweight content blocks on demand.
- AI Video Generator – creates short video assets that can be lazy‑loaded.
- AI Image Generator – produces optimized images at runtime.
- AI Audio Transcription and Analysis – processes voice inputs server‑side, keeping the client bundle thin.
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:
- About UBOS – learn the philosophy behind performance‑first development.
- UBOS platform overview – a modular architecture that separates UI from data processing.
- UBOS for startups – fast‑track MVPs with pre‑optimized templates.
- UBOS solutions for SMBs – scalable performance without enterprise overhead.
- UBOS pricing plans – flexible pricing that aligns with your growth stage.
- UBOS portfolio examples – see real‑world implementations that prioritize session depth.
- UBOS templates for quick start – jump‑start projects with performance‑tested scaffolds.
Additional Resources from the UBOS Marketplace
Explore these templates to enrich your SPA without sacrificing speed:
- Talk with Claude AI app – a conversational UI that can be lazy‑loaded.
- Your Speaking Avatar template – adds voice interaction via ElevenLabs AI voice integration.
- Before-After-Bridge copywriting template – boosts conversion without extra JavaScript.
- AI YouTube Comment Analysis tool – runs server‑side, keeping the client light.
- AI Survey Generator – creates dynamic forms that load on demand.
- Web Scraping with Generative AI – useful for data‑driven dashboards without client‑side overhead.
- AIDA Marketing Template – integrates with AI marketing agents for personalized content.
- Elevate Your Brand with AI – a branding toolkit that leverages server‑side rendering.
- AI LinkedIn Post Optimization – demonstrates how to offload heavy NLP to the backend.
- Image Generation with Stable Diffusion – generate assets on the fly, cached for future visits.
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.