跪拜 Guibai
← Back to the summary

MPAs Are Quietly Replacing SPAs as the Default Web Architecture in 2026

Why is MPA (Multi-Page Application) quietly making a comeback in 2026?

Over the past decade, SPA (Single-Page Application) has almost become the standard configuration for front-end development. Regardless of the business scenario, everyone starts with a set of React Router or Vue Router. But with the evolution of modern infrastructure, this blind architectural worship is being slapped hard by cruel reality.

It's as if you're a primitive person who has never seen the world as long as you're still writing traditional HTML multi-page jumps😖. In pursuit of the so-called silky smooth refresh-free experience, we rigidly moved routing, authentication, state management, and even the entire backend business logic model into the fragile browser memory.

But today in 2026, when you take over a giant SPA project that has been running for three years and is stuffed with 500 pages, you'll find this is not a modernized project at all, but an unmanageable garbage dump.

SPA once swept the front-end field, while the MPA (Multi-Page Application) we despised is beginning to emerge under modern cloud-native infrastructure.


What problems does SPA have?

The biggest fatal flaw of SPA lies in its extremely long memory lifecycle.

In an MPA, when a user jumps from page A to page B, the browser performs a (Hard Reload). This means all memory leaks, all uncleaned timers, and all chaotic global states from page A are completely cleared by the garbage collection mechanism (GC) at the moment of the jump. This is a kind of physical isolation.

ChatGPT Image 2026年7月28日 14_51_59.png

But what about SPA? A user clicks around menus in your system all morning, switching 50 routes, and the browser kernel never refreshes.

The scroll event you bound to window on page A wasn't unbound, so it will continue to trigger wildly on page B; the few megabytes of dirty data you stuffed into Redux on page C will pollute all the way to page D. As the user stays longer, the page's memory usage will skyrocket like a snowball until the browser silently crashes with a white screen.

To solve these problems that shouldn't have existed in the first place, front-end engineers had to invent all sorts of fancy lifecycle hooks, route guards, and state cleanup logic, forcibly putting another heavy shackle on the already overburdened client.


Client-side routing vs. Server-side routing

What price have we paid to achieve refresh-free navigation?

In traditional SPA, a very ordinary user-facing page jump and authentication often quickly bloats at the code level👇:

// For a single page jump, countless defenses and code-splitting logic are written on the client
import { lazy, Suspense } from 'react';
import { BrowserRouter, Route, Routes, Navigate } from 'react-router-dom';

const Dashboard = lazy(() => import('./pages/Dashboard')); // Async chunking

function AppRouter() {
  // The front-end is forced to read the Token in local storage
  const token = localStorage.getItem('token'); 
  
  return (
    <BrowserRouter>
      {/* As long as it's an SPA, you can never escape this disgusting white-screen Loading circle😖 */}
      <Suspense fallback={<LoadingSpinner />}> 
        <Routes>
          <Route 
            path="/dashboard" 
            element={
              // Client-side route guard: load component -> find no permission -> redirect
              token ? <Dashboard /> : <Navigate to="/login" replace />
            } 
          />
        </Routes>
      </Suspense>
    </BrowserRouter>
  );
}

This code seems standard, but it's actually full of compromises: the first screen needs to download a huge route parser, the authentication logic is exposed on the extremely insecure client, and every time an async chunk is loaded, the user must endure that damn Loading circle🤔.

But under the dimensionality-reducing strike of modern MPA in 2026 (like Astro or native RSC architecture), this logic directly returns to the lowest level of the HTTP protocol:

// Routing and authentication completely return to the server
// Zero client routing code, zero state pollution, absolute security isolation

export async function DashboardPage({ request }) {
  // Directly intercept Cookie on the server/edge node
  const token = request.headers.get('Cookie')?.match(/token=([^;]+)/)?.[1];
  
  if (!isValidToken(token)) {
    // The purest, extremely fast native HTTP 302 redirect, no client-side flicker
    return Response.redirect('/login', 302); 
  }

  // Server-side direct connection to fetch data
  const data = await fetchDashboardData(token);
  
  // Directly spit out rendered pure HTML
  // Browser draws directly upon receiving, no JS wrapping, no on-demand loading circle
  return (
    <html>
      <body>
        <DashboardView data={data} />
      </body>
    </html>
  );
}

See? When routing returns to the server, the amount of code is directly halved. You no longer need to deal with messy async loading, nor do fragile route guards on the client. Hand the heaviest things back to the server, and let the browser only do the purest rendering.


Why is server-side rendering popular in 2026?

Some might retort: MPA causes a white screen on every jump, the experience is too poor!

This statement was correct 10 years ago, but today it's a complete case of marking the boat to find the sword🫡.

With the popularization of the HTTP/3 protocol, multiplexing and connection reuse are extremely mature; with edge nodes like Cloudflare compressing the latency of delivering HTML to the client to within 30 milliseconds; with modern browsers introducing bfcache (back/forward cache) and native preloading specifications (Speculation Rules API).

ChatGPT Image 2026年7月28日 15_37_16.png

Today, a modern MPA page's click-to-navigate speed is even faster than your SPA that still needs to request JSON and wait for React to execute the Diff algorithm. Your naked eye can't even detect the so-called page white screen flicker.

Thus, island architecture frameworks like Astro emerged. Their banner is: Default to multi-page applications, default to 0 KB of client-side JavaScript. Only when a specific component on the page (like a like button) needs interaction is JS locally injected.


When to use SPA, and when to use MPA?

ChatGPT Image 2026年7月28日 16_08_54.png

If your business is an online design tool like Figma, or an extremely heavily interactive online spreadsheet, you still need SPA to maintain the high-frequency flow of complex memory states.

But if your business is an independent e-commerce site, a content blog, or even a large part of B-end backend management systems composed of charts and forms, do you really need to package the entire site into a multi-megabyte JS behemoth?

👉 Don't manage state, because eliminating state is the best state management.

What do you guys think about this😁?

Comments

Top 3 of 5 from juejin.cn, machine-translated. The original thread is authoritative.

chlingzool 1 likes

MPAs can provide a decent fig leaf for the frontend industry, where the barrier to entry keeps getting lower.

ErpanOmer

[facepalm][facepalm][facepalm]

世界和平467

Frontend roles are about to die out, and you're still hung up on this. AI will just do it all in one go.

ErpanOmer

It won't disappear in the short term.

汪汪队首席上单

What's the difference?