The Framework Decision That Affects Every Page Load, Forever
Choosing a web framework for a clinic website is not a design decision — it’s an infrastructure decision. The framework you choose determines the performance ceiling of every page on the site, the security posture of the entire application, the maintenance overhead for the next three years, and the cost structure of running the site.
Most Indonesian clinics choose WordPress because it’s familiar, their agency uses it, and it’s the path of least friction. That’s a reasonable decision process — but it’s not an informed one about what’s being traded away.
This comparison uses real performance data from identical clinic landing page designs deployed across four different frameworks. Same design, same content, same hosting region. The only variable is the framework.
Methodology
We built a reference clinic landing page to our standard specification: hero with optimized image, doctor profile section, services section with three featured treatments, Google Reviews display, WhatsApp CTA, NAP block, and JSON-LD schema markup.
The same design was deployed on:
- Astro.js 4.x on Cloudflare Pages (Singapore edge)
- Next.js 14 App Router (SSG, static export) on Vercel (Singapore region)
- Gatsby 5 on Netlify (Singapore region)
- WordPress 6.5 + Elementor 3.x on managed WordPress hosting (Singapore)
All non-Cloudflare deployments used edge CDN at the platform level. Performance was measured using Google PageSpeed Insights mobile reports, averaged across five measurements per deployment.
The Performance Numbers
| Metric | Astro.js | Next.js SSG | Gatsby | WordPress + Elementor |
|---|---|---|---|---|
| Performance Score (Mobile) | 98 | 89 | 81 | 37 |
| LCP | 0.8s | 1.4s | 1.9s | 4.2s |
| CLS | 0.00 | 0.02 | 0.05 | 0.22 |
| TBT | 8ms | 140ms | 280ms | 1,340ms |
| FCP | 0.5s | 0.8s | 1.1s | 2.8s |
| TTFB | 18ms | 28ms | 32ms | 340ms |
| Total JS (initial) | 0KB | 84KB | 112KB | 487KB |
| Total Page Weight | 280KB | 490KB | 610KB | 2.4MB |
Reading the Results
WordPress + Elementor fails every Core Web Vitals threshold by a significant margin. This is the default baseline for Indonesian clinic websites and reflects the structural overhead of WordPress’s server-side rendering, Elementor’s JavaScript runtime, and the accumulated plugin stack.
Gatsby passes LCP and CLS but fails TBT (280ms vs the ≤200ms threshold). It also has the heaviest JavaScript bundle in the static framework category, reflecting its React runtime and hydration overhead. TBT failure means the main thread is blocked long enough to meaningfully delay interactivity.
Next.js SSG passes all Core Web Vitals — an LCP of 1.4s is within the ≤2.5s Good threshold, TBT of 140ms is within ≤200ms, and CLS of 0.02 is comfortably within ≤0.1. For a clinic landing page, this is a good result. The 84KB of initial JavaScript reflects the React runtime shipped even for static pages.
Astro.js delivers the strongest result across every metric. Zero initial JavaScript means zero TBT — the main thread is never blocked. The 0.8s LCP puts the hero in the browser 600ms faster than Next.js SSG and 3.4s faster than WordPress. The total page weight of 280KB is 74% lighter than WordPress.
Why Astro Outperforms Next.js on Static Pages
This is a question that genuine developers ask, so it’s worth answering directly.
Next.js App Router is a powerful framework. For applications requiring server components, authentication, real-time data, and client-side navigation with progressive enhancement, it’s excellent.
But for a clinic landing page — where 100% of the content is static, no user authentication is required, and no real-time data is needed — Next.js ships unnecessary JavaScript.
Even in pure SSG mode (output: 'export'), Next.js includes:
- The React runtime (required for any React component, even static ones)
- The Next.js client router (for prefetching and client-side navigation)
- Hydration code (to “wake up” React on the client even when nothing needs to happen)
This is approximately 84KB of JavaScript that the browser must download, parse, and compile before any of it runs. On a clinic landing page, none of it changes what the patient sees or can do.
Astro’s Islands architecture ships JavaScript only for components that actually need it — interactive elements like a floating WhatsApp button (a small Svelte or React “island” of ~4KB) while the remaining 100% of the page is pure HTML. The browser has virtually no JavaScript to process.
The difference between 8ms TBT and 140ms TBT is 132 milliseconds where the browser’s main thread is occupied processing JavaScript that provides no value to the patient.
Framework Comparison Beyond Performance
Developer Experience
| Dimension | Astro.js | Next.js | Gatsby | WordPress |
|---|---|---|---|---|
| Learning curve | Low–Medium | Medium | Medium–High | Low (for users) |
| Content authoring | Markdown / MDX / CMS | Markdown / MDX / CMS | Markdown / MDX / CMS | Block editor (Gutenberg) |
| Build time (clinic site) | 8–15s | 20–40s | 40–90s | N/A (dynamic) |
| Hot reload / dev experience | Excellent | Excellent | Good | Plugin-dependent |
| Community & ecosystem | Growing rapidly | Very large | Declining | Very large (aging) |
Security Posture
| Framework | Attack Surface | Risk Level |
|---|---|---|
| Astro.js (static) | Static HTML files only | Minimal |
| Next.js | Server components + API routes | Moderate (if using server features) |
| Gatsby | Static HTML + build process | Low |
| WordPress | PHP runtime + DB + plugin ecosystem | High |
Astro and Gatsby (in pure static mode) present the smallest attack surface because they have nothing to attack at runtime — no server process, no database, no admin panel. Next.js inherits server risk if server components or API routes are used. WordPress’s risk is structural and ongoing — 97% of WordPress vulnerabilities originate in plugins, requiring constant update vigilance.
Total Cost of Ownership (3 Years, Clinic-Scale Site)
| Cost | Astro.js | Next.js | Gatsby | WordPress |
|---|---|---|---|---|
| Hosting | Rp 0 | Rp 0–7.2M | Rp 0–6.8M | Rp 18–72M |
| Plugin licenses | Rp 0 | Rp 0 | Rp 0 | Rp 3–18M |
| Developer maintenance | Rp 3–12M | Rp 3–15M | Rp 3–15M | Rp 36–84M |
| Security incidents | Rp 0 | Rp 0–5M | Rp 0 | Rp 5M+ |
| Total | Rp 3–12M | Rp 3–27M | Rp 3–21M | Rp 62–174M |
When to Choose Each Framework
Choose Astro.js When:
- The site is primarily content and conversion (landing pages, blogs, portfolio)
- Performance is the top priority
- Hosting cost matters
- The clinic or SMB doesn’t have a technical team managing ongoing security
- The site is static with minimal interactivity requirements
Choose Next.js When:
- The clinic website includes a patient portal requiring authentication
- Real-time data is needed (live appointment availability, live inventory)
- The development team is primarily React-competent
- The organization needs a unified framework covering both static marketing pages and dynamic application features
Choose Gatsby When:
- You have an existing Gatsby codebase from 2021–2022 that represents significant investment
- For new projects in 2026: this is rarely the right choice. Astro provides better performance with lower complexity.
Choose WordPress When:
- A large non-technical editorial team requires a polished CMS with extensive layout control
- The site is a content hub with hundreds of pages managed by multiple editors
- Budget for ongoing maintenance and security management is available and planned
- Complex WooCommerce e-commerce with existing data is already on the platform
The Clinic-Specific Verdict
For Indonesian clinic landing pages in 2026, Astro.js is the optimal choice by every measurable criterion relevant to the use case:
- Highest performance score (98 vs 89 vs 81 vs 37)
- Fastest LCP (0.8s vs 1.4s vs 1.9s vs 4.2s)
- Lowest initial JavaScript (0KB vs 84KB vs 112KB vs 487KB)
- Lowest 3-year total cost (Rp 3–12M vs Rp 3–27M vs Rp 3–21M vs Rp 62–174M)
- Best security posture (static HTML only)
- Best Core Web Vitals for Google Ads Quality Score impact
Next.js is a strong second choice if server-side features are needed. Gatsby is serviceable but no longer the leading option. WordPress is the weakest performer on every dimension relevant to clinic landing pages, and the most expensive to run.
The framework comparison changes for different use cases — if you’re building a complex patient management portal with real-time scheduling, Next.js is stronger. If you’re building a 30-page content hub managed by 10 editors, WordPress may be easier. The question is what a clinic landing page actually needs to do — and the answer makes the decision clear.
For the full implementation guide on the winning stack, see our complete guide to building a clinic landing page with Astro.js.
References
- HTTPArchive Web Almanac: CMS Performance Chapter 2024 — 2024
- Patchstack: State of WordPress Security 2024 — 2024
- Google Developers: Core Web Vitals — 2024
- Astro Documentation: Why Astro — Islands Architecture — 2024
- Next.js Documentation: Static Exports — 2024
- npm Trends: Astro vs Gatsby vs Next.js Downloads 2024 — 2024
- State of JavaScript Survey: Rendering Frameworks 2024 — 2024
Common Questions About Choosing a Framework for Clinic Websites
What is the best JavaScript framework for a clinic or medical practice website?
For performance-critical clinic landing pages in 2026, Astro.js is the strongest choice for content-focused pages that don't require real-time data or user authentication. It ships zero JavaScript by default and consistently achieves Lighthouse scores of 95–100 on mobile. Next.js is the better choice if the clinic website requires dynamic patient portals, authenticated areas, or real-time data. WordPress remains appropriate for content-heavy sites with large non-technical editorial teams.
Is Gatsby.js still relevant for clinic websites in 2026?
Gatsby has significantly declined in developer adoption since 2022, following its acquisition by Netlify and subsequent shifts in the React Static Site Generator ecosystem. While it remains functional, its build times are slow compared to Astro and its JavaScript overhead is substantially higher. For new clinic website projects starting in 2026, Astro is the more future-forward static-first choice.
Does Next.js deliver better SEO than Astro.js for clinic websites?
No — not for static content pages. Next.js App Router can match Astro's performance for pages using full static generation (SSG), but it ships more JavaScript by default for Client Components and has a higher baseline bundle size. For clinic landing pages where 100% of content is static, Astro's zero-JS-by-default approach consistently delivers equal or better Core Web Vitals scores than Next.js SSG.
What is the hosting cost difference between these four frameworks?
For clinic-scale traffic: Astro on Cloudflare Pages (free tier), Next.js on Vercel (Hobby tier free for low traffic, Pro at $20/month for production sites), Gatsby on Netlify (Free tier with limits, $19/month Pro), WordPress on managed hosting (Rp 500,000–2,000,000/month depending on provider and plan). The Astro + Cloudflare combination delivers the best performance at the lowest ongoing cost for static clinic pages.
Can a clinic use Astro.js for a full website with multiple pages, not just a landing page?
Yes. Astro supports multi-page sites with routing, content collections for blog posts, internationalization (multiple language versions), and integration with CMS platforms for editorial content management. Eranya Digital's own website — including this blog — is built on Astro.js with Cloudflare Pages hosting, demonstrating the framework's capacity for full website use cases.