Marko
Marko scores 11 of 28 points. That is 4 of 14 on the 7 features that affect first paint (the moment the browser first draws content), and 7 of 14 on the 7 other features.
- Version checked
- marko 6.5.1, @marko/run 0.11.19 (pre-1.0), @marko/vite 6.1.14 (npm latest); the marko-books port resolves marko 6.4.15 / @marko/run 0.11.17 / @marko/vite 6.1.14
- Performance guide
- Why is Marko Fast? | MarkoExplanation page, not a tuning guide; closest official page.
- Issues
- github.com/marko-js/marko/issues
Scorecard
All 14 features, in two groups. Each row shows Marko's label, how that label compares across all 23 frameworks, and how to enable the feature. Feature names link to Marko's entry on that feature's page.
Marko's labels across 14 features
- 1st-party4
- Experimental0
- Third-party3
- Manual7
- of 14
How it compares
On 4 of 14 features, no framework has a higher-scoring label than Marko. On the other 10, at least one does.
Tested in our port
The marko-books port passes 11/11 feature tests. Run on 2026-11-26 at MaxwellCohen/marko-books@4f62360. How we test labels
First-paint levers
- 01Production CSS inliningManual0 pts
Manual, like 11 of the other 22 frameworks. 11 frameworks score higher.
Show the how-toHide the how-to
<style>is bundled and loaded once; no inlining option documented (Vite?inlinewould be by hand). No first-party CSS inlining documented. (styling)Code example
You replace the layout's side-effect CSS import with a Vite
?inlineimport, then write it out with<html-style>. The port uses the same$!{…}form for its theme script in<html-script>.// src/routes/+layout.marko import css from "../styles.css?inline" // was: import "../styles.css" <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> // emitted as a literal <style> in the streamed HTML; no stylesheet <link> <html-style>$!{css}</html-style> // … </head> <body> <${input.content}/> </body> </html>Source: Vite: disabling CSS injection
- 02Font optimizationThird-party1 pt
Third-party, like 18 of the other 22 frameworks. 4 frameworks score higher.
Show the how-toHide the how-to
No font primitive documented; self-host by hand with a community package such as Fontsource (as the
marko-booksoptimizedbranch does). The Core Tags reference only shows a Google Fonts@importinside<html-style>(a raw<style>tag). No first-party font handling documented. (core-tag, styling)Code example
The Books port self-hosts Geist with Fontsource. The CSS
@importpulls the package's@font-facerules, and Vite copies the.woff2files into the build with hashed names./* src/styles/global.css */ @import '@fontsource-variable/geist'; @import '@fontsource-variable/geist-mono'; @import 'tailwindcss'; @theme { --font-sans: 'Geist Variable', ui-sans-serif, system-ui, sans-serif; --font-mono: 'Geist Mono Variable', ui-monospace, monospace; }Source: Fontsource: Install
- 03Image pipelineThird-party1 pt
Third-party, like 13 of the other 22 frameworks. 9 frameworks score higher.
Show the how-toHide the how-to
No image component or optimizer documented; the native-tag page and the full reference contain only an
og:imagemeta example and plain<img>.@marko/viterewrites static relative<img src>paths to hashed Vite assets but does not resize or convert. A host image CDN wired by hand is the third-party route, as for React Router and Ember. (native-tag)Code example
Marko has no image component, so a small tag builds a
srcsetagainst the host's image CDN. This one uses Netlify Image CDN URLs; remote sources must be allowlisted innetlify.toml.// src/tags/book-cover.marko export interface Input { src: string; title: string; sizes: string; priority?: boolean } static const WIDTHS = [160, 320, 640]; static function cdn(src: string, w: number) { return `/.netlify/images?url=${encodeURIComponent(src)}&w=${w}&q=75`; } <img src=cdn(input.src, 320) srcset=WIDTHS.map((w) => `${cdn(input.src, w)} ${w}w`).join(", ") sizes=input.sizes alt=input.title width=320 height=480 loading=(input.priority ? "eager" : "lazy") fetchpriority=(input.priority ? "high" : undefined) /># netlify.toml [images] remote_images = ['https://images\.gr-assets\.com/.*']Source: Netlify: Image CDN overview
Art direction with <picture>
ManualServing a different crop or format per screen size. Not scored: the label shows how much the framework does for you.
All native HTML tags are supported, so
<picture>is hand-written. No first-party image helper documented on the native-tag page or in the full reference. (native-tag)Example
Marko renders native tags as-is, so you write
<picture>in a custom tag. You also produce each format and crop yourself and put them inpublic/.// src/tags/hero-image.marko export interface Input { alt: string; priority?: boolean; } <picture> <source media="(min-width: 1000px)" type="image/avif" srcset="/hero-wide.avif"> <source media="(min-width: 1000px)" srcset="/hero-wide.jpg"> <source type="image/avif" srcset="/hero-tall.avif"> <img src="/hero-tall.jpg" alt=input.alt width=750 height=1334 decoding="async" fetchpriority=(input.priority ? "high" : undefined) loading=(input.priority ? "eager" : "lazy") > </picture>Source: Marko native tags
- 04Data/HTML cachingManual0 pts
Manual, like 4 of the other 22 frameworks. 18 frameworks score higher.
Show the how-toHide the how-to
Marko Run documents no data cache, ISR, or cache-header API.
@marko/run-adapter-staticbuilds the whole app into static files by crawling relative links (urlsoption for extras), with no revalidation and no per-route choice, so it does not cache a server-rendered app. Otherwise the app hand-setsCache-Controlon web-standard Request/Response, the same basis as Fresh. Our feature test passed only by settingCache-Controlby hand in the route'sGEThandler. (adapters)Code example
For a fully static site, swap in
@marko/run-adapter-static, which crawls links at build time;urlsadds pages the crawler can't reach. For server-rendered pages, setCache-Controlyourself in middleware, as the Books port does.// vite.config.ts (static build) import { defineConfig } from "vite"; import marko from "@marko/run/vite"; import staticAdapter from "@marko/run-adapter-static"; export default defineConfig({ plugins: [marko({ adapter: staticAdapter({ urls: ["/about", "/1"] }) })], });// src/routes/+middleware.ts (server build) export default async (_ctx: unknown, next: () => Promise<Response>) => { const response = await next(); if (!response.headers.get("content-type")?.includes("text/html")) return response; const headers = new Headers(response.headers); headers.set("Cache-Control", "public, max-age=0, must-revalidate"); return new Response(response.body, { status: response.status, headers }); };Source: Marko Run: Adapters
- 05Route prefetchingManual0 pts
Manual, like 2 of the other 22 frameworks. 20 frameworks score higher.
Show the how-toHide the how-to
No prefetch/preload API in the Marko Run docs or full reference. Lazy
loadtriggers (visible,idle,media, events) defer a tag's JS only; that is not route prefetch. (lazy-loading)Code example
Marko Run navigates with full documents, so a Speculation Rules block in the layout handles it. Supporting browsers prefetch same-origin links on hover; the others ignore the block.
// src/routes/+layout.marko <head> // … <html-script type="speculationrules"> { "prefetch": [{ "where": { "and": [ { "href_matches": "/*" }, { "not": { "selector_matches": "[rel~=nofollow]" } } ]}, "eagerness": "moderate" }] } </html-script> </head>Source: MDN: speculationrules
- 06Streaming SSR1st-party2 pts
1st-party, like 17 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
Streaming is the default. Marko flushes HTML up to each
<await>and sends the rest when its promise resolves; a<try>with@placeholderopts into out-of-order streaming and shows the placeholder first. (streaming)Code example
The handler passes the queries to the page as unresolved promises. Each
<await>sits in a<try>with@placeholder, so the skeleton is sent first and the grid streams in when its promise resolves.// src/routes/+handler.ts export const GET = Run.GET((ctx, next) => { const params = parseSearchParams(ctx.search ?? {}); return next({ books: loadBooksPage(params), // not awaited count: loadBooksCount(params), // not awaited }); });// src/routes/+page.marko <try> <await|books|=$global.data.books> <book-grid books=books/> </await> <@placeholder><book-grid-skeleton/></@placeholder> <@catch|err|><error-state title="Can't load books" body=err.message/></@catch> </try>Source: Marko: Streaming
- 07Early Hints / preload headersManual0 pts
Manual, like 15 of the other 22 frameworks. 7 frameworks score higher.
Show the how-toHide the how-to
No first-party preload
Linkheaders or 103 Early Hints documented. Handlers return web-standardResponseobjects, so aLinkheader is set by hand in a+handleror+middlewarefile. (file-based-routing)Code example
Set a
Linkheader on HTML responses in the root middleware. This one preconnects to the font host. To preload a built file with a hashed name, read its URL from the Vite manifest.// src/routes/+middleware.ts const LINK = '<https://fonts.gstatic.com>; rel=preconnect; crossorigin'; export default async (_ctx: unknown, next: () => Promise<Response>) => { const response = await next(); if (response.headers.get('content-type')?.includes('text/html')) response.headers.append('Link', LINK); return response; };Source: Marko Run: file-based routing
Other features
- 08Islands / partial hydration / lazy slices1st-party2 pts
1st-party, like 14 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
Zero JS by default; the compiler ships only interactive code and the client resumes instead of re-running templates;
import X from "<tag>" with { load: "visible#hero" }defers a tag bundle. The docs describe an islands-like result without a server/client component split. (fine-grained-bundling, why-is-marko-fast, lazy-loading)Code example
Interactive code ships by default only for tags with client state or handlers. To delay one tag's JS further, import it with a
loadtrigger. The server still renders its HTML; the browser fetches the bundle when#reviewsscrolls into view.// src/routes/$id/+page.marko import BookReviews from "<book-reviews>" with { load: "visible#reviews?rootMargin=200px" } <book-detail book=$global.data.book/> <section id="reviews"> <BookReviews bookId=$global.data.book.id/> </section>Source: Marko: Lazy loading
- 09Per-route render modesManual0 pts
Manual, like 3 of the other 22 frameworks. 19 frameworks score higher.
Show the how-toHide the how-to
Marko Run documents streaming SSR; the static adapter is app-wide and
+meta.*is static metadata only. No per-route render-mode switch documented. (file-based-routing, adapters)Code example
Every route still streams SSR. You tag a route with a mode in
+meta.json, and the root middleware turns it into CDN Cache-Control. This adapts the port's+middleware.ts.// src/routes/about/+meta.json → { "render": "static" } // src/routes/+meta.json → { "render": "isr" } // src/routes/+middleware.ts const cacheControl: Record<string, string> = { static: "public, s-maxage=31536000", // cached until redeploy isr: "public, s-maxage=60, stale-while-revalidate=86400", }; export default Run.ALL(async (ctx, next) => { const res = await next(); if (!res.headers.get("content-type")?.includes("text/html")) return res; const mode = (ctx.meta as { render?: string } | undefined)?.render; const headers = new Headers(res.headers); headers.set("Cache-Control", cacheControl[mode ?? ""] ?? "private, no-store"); // SSR return new Response(res.body, { status: res.status, statusText: res.statusText, headers }); }); - 10Fine-grained client reactivity1st-party2 pts
1st-party, like 21 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
The compiler resolves reactivity per expression; "no dependency tracking happens at runtime";
<let>/<const>. (why-is-marko-fast)Code example
<let>declares state and<const>derives from it. The compiler works out which DOM nodes depend oncountat build time, so there is no runtime dependency tracking.// src/tags/counter.marko <let/count=0> <const/doubled=count * 2> <button onClick() { count++ }> ${count} × 2 = ${doubled} </button>Source: Marko: Why is Marko fast
- 11Built-in bundle analysisThird-party1 pt
Third-party, like 18 of the other 22 frameworks. 2 frameworks score higher.
Show the how-toHide the how-to
The CLI has only
dev,build,preview; the Vite plugin options areroutesDir,adapter,trailingSlashes. No first-party analyzer documented; Marko Run builds with Vite, so the third-party route is a community visualizer such as rollup-plugin-visualizer. (cli, vite-plugin)Code example
Marko Run builds with Vite, so add
rollup-plugin-visualizernext to the Marko plugin.marko-run buildthen writes a treemap of the client bundles.// vite.config.ts import { defineConfig } from "vite"; import marko from "@marko/run/vite"; import { visualizer } from "rollup-plugin-visualizer"; export default defineConfig({ plugins: [ marko(), visualizer({ filename: "stats.html", gzipSize: true, brotliSize: true }), ], });Source: rollup-plugin-visualizer README
- 12Third-party script strategiesManual0 pts
Manual, like 16 of the other 22 frameworks. 6 frameworks score higher.
Show the how-toHide the how-to
<script>is effect-like, not a loader;<html-script>emits a raw tag. No loading strategies documented. (core-tag)Code example
Marko's
<script>is a mount effect, so you use<html-script>for a literal async tag. A<script>effect then loads the low-priority widget at browser idle.// src/routes/+layout.marko <head> // … // literal tag in the HTML: downloads in parallel, never blocks parsing <html-script async src="https://analytics.example.com/script.js"></html-script> </head> <body> <${input.content}/> // runs once in the browser after mount, then waits for idle <script> (window.requestIdleCallback || setTimeout)(() => { const s = document.createElement("script"); s.src = "https://widget.example.com/chat.js"; s.async = true; document.head.append(s); }); </script> </body>Source: Marko core tags
- 13Portable multi-host deployment1st-party2 pts
1st-party, like 7 of the other 22 frameworks. None scores higher.
Show the how-toHide the how-to
Official adapters for Node, Static and Netlify (Functions or Edge, needs
netlify.toml) are on the adapters page. Cloudflare Workers (@marko/run-adapter-cloudflare) is announced as an official adapter in the markojs.com October 2026 newsletter but is not yet on the adapters page.@marko/run-adapter-vercel(npm 0.1.1) is published from themarko-js/runrepository by the same maintainers as@marko/runand is documented only in its repo README, not on markojs.com. None is labeled experimental. Themarko-booksport deploys with all three. (adapters)Code example
The Books port picks an adapter at build time from an env var. The default Node adapter covers local and container runs; the Netlify, Vercel and Cloudflare adapters build for each host.
// vite.config.ts import { defineConfig } from "vite"; import marko from "@marko/run/vite"; export default defineConfig(async () => { const adapter = process.env.CLOUDFLARE ? (await import("@marko/run-adapter-cloudflare")).default() : process.env.NETLIFY ? (await import("@marko/run-adapter-netlify")).default() // { edge: true } for Edge Functions : process.env.VERCEL ? (await import("@marko/run-adapter-vercel")).default() : (await import("@marko/run/adapter")).default(); return { plugins: [marko({ adapter })] }; });NETLIFY=1 marko-run build && netlify deploy --prod --no-buildSource: Marko Run: Adapters
- 14Service worker / offline supportManual0 pts
Manual, like 16 of the other 22 frameworks. 6 frameworks score higher.
Show the how-toHide the how-to
No service worker support documented in the Marko or Marko Run docs. Hand-write the worker, serve it as a static file, and register it from a
<script>. (file-based-routing)Code example
Put a hand-written worker in
public/and register it with an inline script in the root layout.// public/sw.js const CACHE = 'books-v1'; // change the name on each deploy self.addEventListener('activate', (event) => { event.waitUntil( caches.keys().then((keys) => Promise.all(keys.filter((k) => k !== CACHE).map((k) => caches.delete(k)))), ); }); self.addEventListener('fetch', (event) => { const { request } = event; if (request.method !== 'GET' || new URL(request.url).origin !== location.origin) return; // Network first, so pages stay current. The cached copy answers when offline. event.respondWith( fetch(request) .then((response) => { const copy = response.clone(); caches.open(CACHE).then((cache) => cache.put(request, copy)); return response; }) .catch(() => caches.match(request)), ); });// src/routes/+layout.marko static const SW_SCRIPT = `if('serviceWorker' in navigator)addEventListener('load',function(){navigator.serviceWorker.register('/sw.js')});`; // … in <head> <html-script>$!{SW_SCRIPT}</html-script>Source: Using Service Workers (MDN)
1st-party scores 2 points, Experimental and Third-party 1, Manual 0. How scoring works
The port
The books demo app built with this framework, and where each branch is deployed.
- App
- marko-books
- Repository
- github.com/MaxwellCohen/marko-books
Branch
main
vibe port
- Vercel
- marko-books.vercel.app
- Netlify
- marko-books.netlify.app
- Cloudflare
- marko-books.to-email-max.workers.dev
Branch
optimized
cache + fonts
Latest benchmark
Mobile Lighthouse lab results from PageSpeed Insights on : the median of 3 runs per host, averaged across the hosts listed. The benchmark page explains each metric and has every other framework.
| Build | Path | Perf | FCP | Raw FCP | LCP | TBT | CLS | SI | TTI | Doc | Hosts |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Book list / | |||||||||||
| baseline | / | 85 | (good)1.51 | 0.97 | (poor)4.26 | (good)0 | (good)0.000 | 2.29 | 4.26 | 143 | 3/3 Vercel, Netlify, Cloudflare |
| optimized | / | 92 | (good)0.96 | 0.93 | (needs improvement)3.35 | (good)0 | (good)0.000 | 1.96 | 3.35 | 105 | 3/3 Vercel, Netlify, Cloudflare |
| Book page /10145787 | |||||||||||
| baseline | /10145787 | 97 | (good)1.51 | 0.60 | (needs improvement)2.57 | (good)0 | (good)0.000 | 1.84 | 2.57 | 113 | 3/3 Vercel, Netlify, Cloudflare |
| optimized | /10145787 | 99 | (good)0.92 | 1.37 | (good)1.77 | (good)0 | (good)0.000 | 2.39 | 1.77 | 160 | 3/3 Vercel, Netlify, Cloudflare |
- Good
- Needs improvement
- Poor
FCP 1.8 s / 3 s · LCP 2.5 s / 4 s · TBT 200 ms / 600 ms · CLS 0.1 / 0.25
Per host
The medians above before averaging. Runs is how many measured runs went into each median. Host names link to the deployment.
| Build | Path | Host | Perf | FCP | Raw FCP | LCP | TBT | CLS | SI | TTI | Doc | Runs | Status |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Marko | |||||||||||||
| baseline | / | Vercel | 85 | (good)1.51 | 0.18 | (poor)4.36 | (good)0 | (good)0.000 | 1.51 | 4.36 | 74 | 3/3 | OK |
| baseline | / | Netlify | 85 | (good)1.52 | 2.31 | (poor)4.07 | (good)0 | (good)0.000 | 3.85 | 4.07 | 167 | 3/3 | OK |
| baseline | / | Cloudflare | 85 | (good)1.51 | 0.43 | (poor)4.36 | (good)0 | (good)0.000 | 1.51 | 4.36 | 189 | 3/3 | OK |
| baseline | /10145787 | Vercel | 97 | (good)1.51 | 0.19 | (needs improvement)2.56 | (good)0 | (good)0.000 | 1.51 | 2.56 | 68 | 3/3 | OK |
| baseline | /10145787 | Netlify | 97 | (good)1.51 | 1.32 | (needs improvement)2.56 | (good)0 | (good)0.000 | 2.47 | 2.56 | 154 | 3/3 | OK |
| baseline | /10145787 | Cloudflare | 97 | (good)1.51 | 0.28 | (needs improvement)2.59 | (good)0 | (good)0.000 | 1.54 | 2.59 | 117 | 3/3 | OK |
| optimized | / | Vercel | 92 | (good)0.91 | 0.26 | (needs improvement)3.31 | (good)0 | (good)0.000 | 0.91 | 3.31 | 75 | 3/3 | OK |
| optimized | / | Netlify | 89 | (good)1.07 | 2.30 | (needs improvement)3.60 | (good)0 | (good)0.000 | 3.96 | 3.60 | 142 | 3/3 | OK |
| optimized | / | Cloudflare | 94 | (good)0.91 | 0.23 | (needs improvement)3.15 | (good)0 | (good)0.000 | 1.00 | 3.15 | 98 | 3/3 | OK |
| optimized | /10145787 | Vercel | 98 | (good)0.91 | 2.33 | (good)1.67 | (good)0 | (good)0.000 | 3.66 | 1.67 | 130 | 3/3 | OK |
| optimized | /10145787 | Netlify | 100 | (good)0.94 | 0.30 | (good)1.83 | (good)0 | (good)0.001 | 1.07 | 1.83 | 128 | 3/3 | OK |
| optimized | /10145787 | Cloudflare | 99 | (good)0.92 | 1.48 | (good)1.81 | (good)0 | (good)0.000 | 2.44 | 1.81 | 223 | 3/3 | OK |