What is a single-page application? When an SPA fits and when it does not
By Sina Esfahani, OmniTechs · Published 30 November 2026
A single-page application (SPA) is a web app that loads one HTML document and then changes what you see with JavaScript, without asking the server for a new page on every click. MDN, Mozilla's developer reference, names the trade-off straight away: smoother navigation, but extra effort for SEO, navigation, keeping track of state and measuring performance.
The short rule: an SPA suits a tool people log in to and work in for a while, such as a planning board or a customer portal. For pages that must be found in Google and read quickly, such as service pages, articles and a shop catalogue, pages rendered on the server or at build time are the safer default. Many sites need both.
Your first step: split your planned pages into two lists, public pages that must be found in search and pages behind a login. That split decides most of the rest.
Decide in this order:
Split pages into public (must be found) and logged-in (must be quick to work in).
Give public pages their HTML from the server or the build, not only from JavaScript.
Use an SPA only where users do many actions per visit.
Agree a JavaScript budget for the first screen and measure it on a slow mobile profile.
Require real links, one URL per view, a 404 for missing items and a new page title per view.
Test route changes with a keyboard and a screen reader before launch.
How a single-page application works
On a classic multi-page site, every click asks the server for a complete new HTML page. An SPA works differently:
The first request returns a light HTML page, the app shell, plus the JavaScript that contains the application.
When you click a link, JavaScript intercepts the click, fetches only the data it needs and redraws part of the screen.
It updates the address bar through the browser's History API, so the back button and bookmarks keep working.
That is why moving around an SPA can feel instant after the first load, and why the first load can be heavy: the browser must download and run the application before it shows anything useful.
SPAs are often built with a client-side framework such as React, Angular or Vue. The framework also handles routing: which URL shows which view.
The rendering terms in the table below come from web.dev, Google's guidance site for developers. Client-side rendering (CSR) builds the page in the browser; that is the classic SPA. Server-side rendering (SSR) builds complete HTML on the server at each request. Static rendering builds it once, at build time. Hydration is the hybrid: complete HTML first, after which JavaScript takes over in the browser. Frameworks such as Next.js and Nuxt offer static and server rendering, so one project can choose per page.
SPA, server-rendered or hybrid: the decision table
Which rendering approach fits which page
| Criterion | SPA (client-side) | Server-rendered | Static | Hybrid |
|---|---|---|---|---|
| First view | Waits for JavaScript | Complete HTML, server work per request | Fastest, from a cache | Complete HTML, then scripts |
| Content Google sees | Only after rendering | In the first response | In the first response | In the first response |
| Clicks within the site | Instant once loaded | Full page load | Full page load | Can switch views without reload |
| Personal or live data | Yes, through an API | Yes | Not per visitor | Yes |
| Best fit | Logged-in tools | Personal or fast-changing public pages | Articles, service pages | Sites with public pages and app parts |
Drawing on its work with large sites, the web.dev team encourages developers to consider server-side or static rendering first and to check whether those "can get you most of the way there". Mixing is normal: Netflix, web.dev notes, server-renders its fairly static landing pages and prefetches the JavaScript for its interaction-heavy pages.
Martin Splitt of Google explains pre-rendering, server-side and client-side rendering in eight minutes; how to choose starts at 6:49.
SEO: what Google does with a single-page application
Google can index JavaScript sites, but with an extra step. Its guide to JavaScript SEO basics (updated 4 March 2026) describes three phases: crawling, rendering and indexing. A page can wait in the rendering queue "for a few seconds, but it can take longer than that" before a headless Chromium browser runs your JavaScript. Google adds that server-side or pre-rendering is "still a great idea": it is faster for users and crawlers, and not all bots run JavaScript.
If public views of your SPA must rank, ask your developer to meet these points from the same guide:
Real links. Google only discovers links that are a elements with an href attribute; click handlers on buttons are not followed.
One URL per view, without a hash. Route with the History API; do not load different content on fragments such as /#/products.
No soft 404s. A client-side router often answers every URL with status 200. For a missing item, redirect to a URL that returns a real 404, or add a noindex robots tag to the error view.
A title and description per view, set by JavaScript if needed.
The canonical in the HTML. If JavaScript sets it too, it must keep the same value.
Pages behind a login are a different case: Google's guidance is to return a 401 status code for them, so they are not meant for the index. For a portal, SEO is no argument against an SPA. Only its public entry points, such as the login page and the pages that explain the service, need to be findable.
Skip the old workaround. Dynamic rendering, serving bots a pre-rendered copy and users the SPA, is "a workaround and not a recommended solution" according to Google Search Central (updated 10 December 2025); it recommends server-side rendering, static rendering or hydration. One line in web.dev's rendering article still calls it an option; follow the Search Central page.
To see what Google actually renders for one of your pages, use URL Inspection as described in the technical SEO checklist.
Performance: Core Web Vitals and bundle size
Core Web Vitals are Google's measures of loading, responsiveness and visual stability. Good means a Largest Contentful Paint (LCP, main content visible) within 2.5 seconds, an Interaction to Next Paint (INP, response to clicks and taps) of 200 milliseconds or less and a Cumulative Layout Shift (CLS) of 0.1 or less, at the 75th percentile of page loads, separately for mobile and desktop.
An SPA pays its cost up front. The bundle, the JavaScript files that make up the app, must download and run before the first useful screen, and web.dev warns that this JavaScript "tends to grow as an application grows", which can hurt INP. The HTTP Archive's Web Almanac measured a median of 558 kilobytes of JavaScript per mobile page in 2024, 14% more than a year earlier.
Put that in seconds. Lighthouse, Google's page testing tool, simulates a slow mobile connection at 1.6 megabits per second with 150 milliseconds of latency, and slows the processor four times. On that profile, 400 kilobytes of JavaScript (3.2 megabits) takes about 2.0 seconds just to download, and the 558 kilobyte median about 2.8 seconds. Both leave out latency and the time the phone needs to run the code. To estimate your own case, read how much JavaScript your first screen transfers in the browser's network panel; use the transferred, compressed size, not the uncompressed resource size. Then kilobytes × 8 ÷ 1,600 gives seconds of download on that profile.
What helps, according to web.dev: split the code per route, load the rest only when needed, and cache the app shell with a service worker for quick repeat visits. Ask your supplier for a JavaScript budget in kilobytes for the first screen and a Lighthouse mobile report of that screen at delivery.
Measuring an SPA is also harder. Core Web Vitals were built around full page loads, and a click that swaps the view in an SPA, a soft navigation, did not count as a new page. Chrome measures soft navigations by default from version 151 and reports them in the Chrome User Experience Report as experimental metrics (Chrome for Developers, updated 20 September 2026). Check that your monitoring tool supports this before trusting figures per view.
Smooth navigation alone is no reason for an SPA. A multi-page site can animate between pages with cross-document view transitions (Chrome 126 and later) and let Chrome prerender the likely next page through the Speculation Rules API for a near-instant load.
Accessibility: focus and announcements on route change
On a normal page load, screen readers announce the new page title. In an SPA nothing reloads: unless the developer handles it, keyboard focus can stay on the clicked link and a screen reader user may get no sign that the content changed.
Three requirements cover most of it:
Change the page title per view. W3C's explanation of WCAG success criterion 2.4.2 says SPAs should update the title to match the current view.
Move focus to the new content. In 2019 user tests for Gatsby with people using a screen reader, magnification, voice control and switch access, focusing the new view's heading worked best for screen reader users. The refined advice: a small skip link that takes focus after a route change, plus a live region (an area screen readers announce when its text changes) that names the new page.
Keep a visible focus outline, so sighted keyboard and voice users see where they are.
Some frameworks help: Next.js announces client-side route changes by default, reading the page title, then the first heading, then the URL.
Test it: follow a menu link using only Tab and Enter. It passes when the title in the browser tab changes and the next Tab lands in the new content, not back in the menu. Repeat with a screen reader, such as NVDA on Windows or VoiceOver on a Mac: it must announce the new page. If either check fails, fix it before launch.
When an SPA fits, and when it does not
An SPA fits when users log in and do many actions per visit on the same data, such as a planning board, a dashboard with filters or a customer portal used every week; when the screen must react without reloads; and when search visibility of those screens does not matter.
Choose server-rendered or static pages when the page must be found, shared and read (service pages, articles, landing and product pages), when most visitors view one or two pages and leave, and when the content is mostly text and images.
Choose a hybrid when one site has both, which is common. The web app development page draws the same line one level up: when public information and contact are the real need, a website may suffice; a web application is worth investigating when known users must complete a recurring task in the browser. Whether the browser is the right place at all is covered in web app vs native app.
Worked example: an installer with a public site and a customer portal (hypothetical)
An installation company has about 20 public pages (services, prices, contact, articles) and wants a portal where customers see work orders, approve quotes and upload photos. Its developer proposes one SPA for everything.
Split. The 20 public pages must be found; the portal sits behind a login.
Public pages. Render them statically or on the server, so Google sees the content in the first response.
Portal. Build it as an SPA under its own path, such as /portal. Customers work in it after logging in, so instant switching between orders and quotes is worth the first load.
Budget. A 450 kilobyte portal bundle means 450 × 8 ÷ 1,600 ≈ 2.3 seconds of download on the slow mobile profile, before the code runs: too close to 2.5 seconds. The developer splits it into a 150 kilobyte first part for the order list (about 0.8 seconds) and loads the photo and quote screens when opened.
Checks. Real links between views, a 404 for an order number that does not exist, a title per view and the keyboard test.
Under the original proposal, every visitor arriving from Google on a service page would also download the portal code, and the service pages would depend on Google's rendering step to be indexed.
Contrast: if customers opened the portal once a year to approve one quote, the SPA's advantage disappears. Three server-rendered screens, a list, a quote and an approve button, are simpler to build, test and keep accessible. Replace the hypothetical bundle sizes with your own.
When you are done, and when to get help
You are done when public pages deliver their content as HTML in the first response, the logged-in part stays within an agreed JavaScript budget on a slow mobile profile, every view has its own URL and title, missing items return a 404, and the keyboard and screen reader test passes.
Get help from a front-end developer when URL Inspection shows content missing from public pages, when the first screen still misses 2.5 seconds after code splitting, or when the route-change test fails. Bring the URL, the Lighthouse report and what you clicked. Moving public pages to server or static rendering is a structural change: record it as an architecture decision, as explained in software architecture explained for clients.
If you are planning a portal or internal tool, OmniTechs builds customer portals and internal web applications around one workflow; the first discussion is free.
Sources
MDN Web Docs: SPA (Single-page application), modified 11 July 2025
MDN Web Docs: Introduction to client-side frameworks, modified 10 November 2026
web.dev: Rendering on the Web, Addy Osmani and Jason Miller, updated 5 January 2026
Google Search Central: Understand the JavaScript SEO basics, updated 4 March 2026
Google Search Central: Dynamic rendering as a workaround, updated 10 December 2025
Chrome for Developers: Soft navigations, updated 20 September 2026
Chrome for Developers: Prerender pages for instant page navigations, updated 13 November 2026
Marcy Sutton, Gatsby: user testing of accessible client-side routing, 11 July 2019

