A single-page application (SPA) is a web app that loads a single HTML document and then rewrites the page in the browser as the user navigates, using JavaScript to fetch data and render views without full page reloads.
Why it matters
SPAs feel fast and app-like after the first load, which suits dashboards and tools. The costs are a larger initial JavaScript download, a blank page until scripts run, and extra work to make URLs, the back button and search indexing behave. Monitoring is trickier too: the server can return 200 for every route while the app shows an error.
Example
The server returns almost empty HTML:
<div id="root"></div>
<script src="/assets/app.js"></script>
The script then renders everything into #root. A request to /settings must be rewritten to this same file so the client router can take over.
Common mistakes
- Forgetting a server fallback rule, so refreshing a deep link returns 404.
- Relying on client rendering for content that needs to be indexed or shared quickly.
- Monitoring only the homepage status code and missing a broken API behind it.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.