Panduan Qwik SEO
How Qwik's resumability puts konten di HTML oleh default dan drives near-zero INP dan TBT — plus QwikCity patterns untuk meta tags, canonical URLs, JSON-LD, sitemaps, dan i18n itu membuat sebuah Qwik situs peringkat.
Bahasa
1 sinyal bukti di halaman ini
- Alat aktif terkaitPage Speed Test & Core Web Vitals Checker
Qwik adalah sebuah JavaScript framework whose core trick adalah resumability: server serializes app state, listeners, dan component tree ke HTML, so browser resumes without hydrating (sebuah ~1 KB Qwikloader script masih runs — ini adalah not literally zero JS). untuk SEO itu's sebuah double win pada routes itu adalah actually server-rendered — konten adalah di HTML oleh default (crawler see ini immediately, no render-wave delay) dan INP/TBT trend toward zero because no hydration blocks main thread pada muat; confirm both dengan data lapangan alih-alih assuming them. QwikCity, meta-framework, lets Anda mix SSR dan SSG per route, plus routeLoader$() untuk server-side data dan sebuah head export untuk judul/meta/OG/canonical/JSON-LD — semua server-rendered. Basic SEO berfungsi out dari box; main discipline adalah menggunakan routeLoader$() untuk dynamic metadata, not client-side effects. catch adalah sebuah smaller ecosystem daripada React/Vue, dan — sebagai dari ini writing — Qwik adalah pada -nya v2 line, currently di beta.
TL;DR — Qwik adalah sebuah JavaScript framework itu melakukan something unusual: ini mengirim finished HTML dan lalu runs almost no JavaScript when halaman memuat. sebagian besar frameworks memiliki untuk “hydrate” (terjemahan) “hydrate” — re-run mereka code di Anda browser untuk wake halaman up — dan Qwik skips itu entirely oleh resuming dari data baked ke HTML. untuk SEO itu berarti crawler see Anda full konten right away, dan halaman score well pada speed metrics Google measures.
What Qwik adalah
sebagian besar popular frameworks (React, Vue, Angular) bangun lot dari halaman di Anda browser. bahkan when server mengirim finished HTML, framework biasanya memiliki untuk hydrate ini — download -nya code dan re-run ini di Anda browser untuk membuat buttons dan menus berfungsi. itu hydration langkah adalah one dari biggest alasan halaman feel slow: ini ties up browser right when Anda’re trying untuk gunakan halaman.
Qwik attacks itu masalah head-pada dengan sebuah idea called resumability. pada server, Qwik renders HTML dan writes everything halaman perlu untuk pertahankan berfungsi — -nya state, which clicks melakukan what, structure dari halaman — straight ke HTML. When halaman memuat di Anda browser, Qwik doesn’t re-run anything. ini resumes dari itu saved informasi, so ini isn’t re-executing Anda components — tetapi ini isn’t literally zero JavaScript either. sebuah tiny (~1 KB) loader script called Qwikloader melakukan run pada muat; ini hanya listens untuk clicks alih-alih rebuilding halaman. Evidence for this claim Qwik serializes application state into HTML and resumes without eagerly re-executing the application on startup. Scope: Qwik resumability; exact JavaScript transferred depends on the application. Confidence: high · Verified: Qwik: Resumable ini hanya fetches rest dari code ini perlu moment Anda actually click something.
QwikCity adalah full toolkit dibangun pada top dari Qwik — ini adalah untuk Qwik what Next.js adalah untuk React. ini gives Anda halaman routing, server rendering, dan sebuah clean place untuk set Anda judul dan meta tags. jika Anda’re doing SEO pada sebuah Qwik situs, Anda’re almost certainly menggunakan QwikCity.
Why ini adalah baik untuk SEO
Two alasan:
- Anda konten adalah di HTML. Because Qwik renders everything pada server dan tidak pernah perlu untuk render again di browser, text dan tautan Google perlu adalah right there di halaman source. Google doesn’t memiliki untuk melakukan anything tricky untuk see Anda konten — which adalah whole game di JavaScript SEO. itu’s benar when route adalah actually server-rendered (SSR atau SSG) — periksa raw HTML dengan view-source pada Anda own deployed halaman alih-alih assuming ini dari framework alone.
- halaman adalah fast dan responsive. dengan very little JavaScript running pada muat, halaman reacts untuk clicks quickly (baik INP) dan browser isn’t blocked. Core Web Vitals reward exactly itu, so ini adalah sebuah nyata — jika biasanya kecil — advantage. ini adalah sebuah structural head start, not sebuah guarantee; confirm ini dengan data lapangan pada Anda own situs rather daripada assuming angka.
What Anda masih memiliki untuk melakukan
“Works out of the box” (terjemahan) “berfungsi out dari box” tidak berarti “do nothing.” (terjemahan) “melakukan nothing.” big one: set Anda judul,
deskripsi, dan lainnya meta tags menggunakan QwikCity’s head export pada setiap halaman,
dan untuk halaman dengan dynamic data (blog posts, product halaman) pull itu data
server-side dengan routeLoader$() so meta tags end up di HTML — not
ditambahkan later oleh JavaScript. Evidence for this claim Qwik City routes can provide page metadata through a head export, and routeLoader$ loads route data on the server. Scope: Qwik City metadata and loaders. Confidence: high · Verified: Qwik City: Head Qwik City: Route loaders Get itu right dan sebagian besar dari Qwik SEO takes care dari
itself.
ingin nyata mechanics — how resumability berfungsi, exact QwikCity patterns untuk meta tags, canonical URLs, data terstruktur, dan sitemaps, plus pitfalls? Switch untuk Advanced tab.
TL;DR — Qwik’s core innovation adalah resumability: di SSR time ini serializes event listeners (sebagai HTML attributes), component tree (di HTML comments), dan app state (di sebuah
qwik/jsonscript) ke HTML, so browser resumes alih-alih hydrating — sebuah ~1 KB Qwikloader script masih runs, so ini adalah not literally zero JS. itu’s categorically berbeda dari React/Vue/Angular/SolidJS, which semua hydrate. pada routes itu adalah actually server-rendered, SEO payoff adalah twofold: konten adalah di HTML oleh default (no render-wave delay untuk crawler) dan INP/TBT trend toward zero because no hydration blocks main thread pada muat — verify both dengan field data alih-alih assuming them. QwikCity adalah meta-framework — SSR dan SSG dapat menjadi mixed per route, not chosen once untuk whole project. Metadata lives diheadexport (judul, meta, OG, canonical, JSON-LD), fed olehrouteLoader$()untuk server-side data. Sitemaps adalah automatic di SSG (untuk routes actually dibangun) dan sebuah dynamic route di SSR. Qwik adalah currently pada -nya v2 line (beta) sebagai dari ini writing. honest caveat: ecosystem adalah newer dan smaller daripada React’s.
Resumability: core idea (dan why SEO cares)
Qwik adalah dibangun oleh Miško Hevery — creator dari Angular — di builder.io, dan -nya whole alasan untuk exist adalah untuk kill hydration. (sebagai dari ini writing, Qwik adalah pada -nya v2 line, currently di beta — periksa API surface terhadap Anda installed versi sebelum copying code dari apa pun source, including ini one.) Hydration adalah what setiap mainstream framework melakukan setelah SSR: ini downloads component code dan re-executes ini di browser untuk attach event handlers dan rebuild internal state. sebagai Hevery puts ini, “Hydration is when an application is downloaded and executed twice, once as HTML and again as JavaScript.” (terjemahan) “Hydration adalah when sebuah application adalah downloaded dan executed twice, once sebagai HTML dan again sebagai JavaScript.” itu kedua execution adalah pure overhead — halaman looks ready tetapi isn’t interactive, dan main thread adalah blocked.
Qwik instead serializes three things ke HTML di SSR time:
- Event listeners — encoded sebagai HTML attributes (e.g.
on:click="./chunk.js#symbol"). sebuah tiny inline script ( Qwikloader, ~1 KB) attaches one global listener, reads encoded chunk/symbol pada sebuah event, dan downloads hanya itu handler code pada demand. - Component tree structure — encoded di HTML comments, so Qwik dapat rebuild hierarchy without executing component code.
- Application state — serialized ke sebuah
<script type="qwik/json">block, so apa pun component dapat resume without -nya parent menjadi present.
When halaman memuat, Qwik doesn’t re-run Anda components. Evidence for this claim Qwik resumability restores listeners and application state without rerunning component initialization on page startup. Scope: Qwik resumability model. Confidence: high · Verified: Qwik: Resumable sebagai docs put ini, “Resumability is a way for a framework to recover its state without re-executing the application components on the client.” (terjemahan) “Resumability adalah sebuah cara untuk sebuah framework untuk recover -nya state without re-executing application components pada client.” hasil, di docs’ kata: “Qwik apps work instantly without any delay because they don’t need hydration, regardless of their size or complexity.” (terjemahan) “Qwik apps berfungsi instantly without apa pun delay because mereka don’t perlu hydration, regardless dari mereka size atau complexity.”
ini adalah not Islands Architecture (Astro). Islands masih hydrate setiap island individually. Qwik hydrates nothing — there’s no per-island hydration cost because there’s no hydration di semua.
What crawler actually menerima
Because Qwik pre-renders everything server-side dan tidak pernah re-renders pada
client, ** HTML Googlebot fetches sudah berisi Anda complete konten** —
text, tautan, heading, lot — untuk sebuah route itu’s actually rendered pada
server. rendering adalah sebuah per-route decision di QwikCity (SSR, SSG, atau sebuah mix); sebuah
route left di client-hanya mode, atau konten fetched dari sebuah client-side effect
alih-alih routeLoader$(), doesn’t get ini benefit hanya because project
menggunakan Qwik. Google processes JavaScript di two waves (HTML pertama, lalu sebuah deferred
render pass itu dapat lag hours untuk days). sebuah heavily client-rendered app risks
konten hanya showing up di itu kedua wave. sebuah properly server-rendered Qwik
route sidesteps itu risk: there’s no render-queue delay because konten adalah
tidak pernah waiting pada client JS di pertama place. Treat “Qwik pages behave like
static HTML for crawlers” (terjemahan) “Qwik halaman behave like
static HTML untuk crawler” sebagai architecture’s intent, lalu confirm ini pada Anda
deployed URLs dengan view-source — safest posture untuk
JavaScript SEO adalah verifying respons, not
trusting framework label.
Bing berfungsi yang sama cara — sebuah two-wave model itu prefers server-rendered HTML untuk efficiency. Qwik’s HTML-pertama output benefits both mesin untuk yang sama alasan.
Core Web Vitals: sebuah structural advantage
Google menggunakan data lapangan (CrUX) untuk pengalaman halaman signal, dan INP replaced FID sebagai sebuah Core Web Vital di March 2024. Here’s where Qwik’s architecture pays off directly: dengan Qwikloader sebagai satu-satunya script running pada muat — docs note situs “can boot with about 1kb of JS (regardless of application complexity)” (terjemahan) “dapat boot dengan tentang 1kb dari JS (regardless dari application complexity)” — there’s almost nothing untuk block main thread. Total Blocking Time trends toward zero dan INP stays rendah because there’s no hydration pass competing dengan pengguna’s pertama interactions. sebuah bigger Qwik app tidak berarti sebuah bigger startup bill; JavaScript adalah fetched lazily, per interaction, not sebagai one boot bundle.
itu’s difference dari established frameworks. Next.js, Nuxt, dan Angular SSR semua put konten di HTML too — mereka’re not buruk untuk SEO — tetapi mereka carry sebuah hydration cost itu scales dengan app. Qwik menghapus itu cost oleh design.
itu’s architectural expectation, not sebuah diukur hasil. ini doesn’t guarantee sebuah spesifik INP, TBT, atau CrUX score untuk Anda situs — ketiga-party scripts, analytics tags, dan per-route data-fetching cost dapat semua eat ke advantage. Confirm ini dengan data lapangan (CrUX, Search Console’s Core Web Vitals report) pada Anda own deployed URLs sebelum membuat sebuah performa claim untuk sebuah client atau stakeholder; see cara mengukur tab untuk spesifik KPIs dan cadence.
Meta tags dan document head
di QwikCity, halaman metadata lives di sebuah head export dari setiap route file. untuk
static metadata ini adalah sebuah constant: Evidence for this claim Qwik City route modules can export a DocumentHead value or function for route metadata. Scope: Qwik City route metadata. Confidence: high · Verified: Qwik City: Head
export const head: DocumentHead = {
title: 'Qwik SEO Guide',
meta: [
{ name: 'description', content: 'How Qwik resumability helps SEO.' },
{ property: 'og:title', content: 'Qwik SEO Guide' },
{ property: 'og:description', content: 'Resumability, meta tags, sitemaps.' },
],
links: [
{ rel: 'canonical', href: 'https://example.com/qwik-seo/' },
],
};semua dari ini adalah rendered server-side ke <head>, so ini adalah di HTML
crawler sees. canonical pattern — links: [{ rel: 'canonical', href: '...' }]
— adalah easy untuk miss tetapi adalah right place untuk ini.
untuk dynamic metadata (blog posts, products), SEO-critical pattern adalah
routeLoader$(). ini runs server-side sebelum HTML respons, dan head
export can be a function that receives the resolved loader value:
export const usePost = routeLoader$(async ({ params }) => {
return await getPost(params.slug); // runs on the server
});
export const head: DocumentHead = ({ resolveValue }) => {
const post = resolveValue(usePost);
return {
title: post.title,
meta: [{ name: 'description', content: post.excerpt }],
links: [{ rel: 'canonical', href: `https://example.com/blog/${post.slug}/` }],
};
};ini adalah QwikCity’s equivalent dari getServerSideProps. discipline itu penting
untuk SEO: fetch metadata data dengan routeLoader$(), not di sebuah client-side
effect (useSignal()/useResource$() itu run di browser). jika Anda atur
judul dari sebuah client effect, ini won’t menjadi di pertama-wave HTML.
data terstruktur (JSON-LD)
JSON-LD goes di head export’s scripts array, rendered inline di
<head> server-side dan fully dapat di-crawl:
export const head: DocumentHead = ({ resolveValue }) => {
const post = resolveValue(usePost);
return {
title: post.title,
scripts: [
{
props: { type: 'application/ld+json' },
script: JSON.stringify({
'@context': 'https://schema.org',
'@type': 'Article',
headline: post.title,
datePublished: post.date,
}),
},
],
};
};Because ini adalah serialized ke HTML respons, there’s no rendering delay sebelum
markup adalah available untuk crawler. One setup detail itu’s easy untuk miss:
scripts field hanya produces output jika Anda project’s router-head component
actually renders head.scripts (typically via dangerouslySetInnerHTML) — ini adalah
not automatic hanya because Anda populated array. jika sebuah starter template’s
router-head.tsx doesn’t sudah loop di atas head.scripts, tambahkan itu sebelum
trusting JSON-LD menampilkan up di respons.
Sitemaps dan robots.txt
- SSG membangun:
sitemapOutFileconfig option auto-generatessitemap.xmlselama static bangun — tetapi ini hanya mencakup routes itu adalah actually dibangun. sebuah route excluded dari static bangun (dynamic params Anda didn’t pre-render, sebuah halaman gated behind sebuah condition) won’t menjadi di sitemap bahkan though ini exists. - SSR situs: there’s no automatic sitemap — tambahkan sebuah route di
src/routes/sitemap.xml/index.tsdengan sebuahRequestHandleritu membangun dan mengembalikan XML dynamically. robots.txt: drop ini di/public/so ini adalah disajikan di root.- Canonical dan sitemap URLs both depend pada
origin. QwikCity membangun absolute URLs dari configuredorigin/base(atau sebuah forwarded-header origin di SSR middleware). sebuah wrong atau leaked preview/staging origin di itu configuration produces wrong canonicals dan sitemap entries di production — periksa actual output, not hanya config file, setelah apa pun adapter atau deployment perubahan.
SEO internasional
Two mechanisms, digunakan together:
rewriteRoutesdi QwikCity config maps localized URL paths untuk Anda routes without duplicating components (e.g./it/documentazione/→/docs/). ini gives Anda clean, localized URLs — foundation untuk sebuah international struktur URL.- Qwik Speak (sebuah separate library) handles konten translation.
- hreflang tags go di
headexport’slinksarray, pointing setiap locale di -nya alternates. See SEO internasional dan hreflang untuk cross-mesin aturan.
SSR vs. SSG untuk SEO
Both put konten di HTML, so both adalah crawler-safe — dan QwikCity lets Anda mix modes per route, not hanya once untuk whole project. Choose per route oleh konten shape:
- SSG (static adapter) produces pure HTML files, no server needed — ideal untuk konten itu doesn’t perubahan per permintaan. Automatic sitemap (untuk routes itu adalah actually dibangun), cheapest hosting, fastest TTFB dari sebuah CDN. tradeoff adalah freshness: konten hanya updates pada next bangun, dan sebuah route itu fails untuk bangun simply isn’t there.
- SSR renders per permintaan — needed untuk personalized atau frequently changing
data. Run ini di edge (Cloudflare, Vercel, Netlify) untuk rendah TTFB, dan set
Cache-Controlheaders pada SSR respons so CDN dapat sajikan repeats without re-rendering. tradeoff adalah itu sebuah failure di permintaan time (sebuah slow atau erroredrouteLoader$()) affects live respons, so tambahkan error handling untuk data fetch alih-alih letting ini surface sebagai sebuah broken halaman.
Neither mode adalah “more SEO-safe” (terjemahan) “more SEO-safe” daripada lainnya oleh default — pick per route based pada how sering konten perubahan dan what happens jika data source adalah briefly unavailable, lalu verify deployed respons either cara.
What untuk watch out untuk
- Not everything serializes. Class instances, promises, dan streams dapat’t menjadi
put ke HTML state. Code itu touches them memiliki untuk run client-hanya — pertahankan ini
out dari anything itu perlu untuk menjadi di server HTML (terutama metadata). jika Anda
deliberately exclude sebuah nilai dengan
noSerialize(), remember ini comes back sebagaiundefinedsetelah app resumes pada client — don’t reach untuk ini pada anything halaman masih perlu untuk read post-resume, including metadata paths. useVisibleTask$()adalah sebuah nyata escape hatch, gunakan ini sparingly. ini runs eagerly pada client setelah initial render — one hook itu deliberately berfungsi terhadap resumability. ini doesn’t block rendering atau hurt initial HTML, tetapi ini melakukan berarti client JS adalah running itu Qwik akan otherwise memiliki deferred. Fine untuk genuinely client-hanya berfungsi (sebuah chart library, sebuah map); wrong choice untuk anything itu seharusnya menjadi feeding server-rendered metadata.- Verify meta tags adalah di source, not injected oleh JS. View-source (not hanya
DevTools’ rendered DOM) seharusnya tampilkan Anda judul, canonical, dan JSON-LD. jika mereka
hanya appear di rendered DOM, Anda set them dari sebuah client effect alih-alih
headexport /routeLoader$(). routeLoader$()vs.useResource$()/useSignal(). Loaders run pada server dan feedhead; others dapat run di browser. untuk anything itu harus menjadi di metadata atau pertama-wave HTML, gunakan loader.- Smaller ecosystem. Qwik memiliki far fewer CMS connectors dan SEO plugins daripada Next.js, dan sebuah smaller community untuk draw pada. framework adalah capable; Anda’ll hanya write more glue yourself. builder.io’s own situs runs pada Qwik, so ini adalah digunakan di production — tetapi go di eyes-open tentang maturity gap.
Where ini sits
Qwik adalah one dari two frameworks di JavaScript frameworks story — lainnya menjadi SolidJS. key distinction untuk pertahankan straight: Qwik resumes; SolidJS (dan React, Vue, Angular) hydrate. Both masih output konten-rich HTML via mereka meta-frameworks, so crawling adalah fine either cara; resumability angle adalah what membuat Qwik’s INP/TBT profile structurally best dari group. untuk metric side, see Core Web Vitals; untuk foundations, JavaScript SEO hub.
AI summary
sebuah condensed take pada Advanced versi:
- Qwik = resumability. di SSR ini serializes event listeners (HTML attributes),
component tree (HTML comments), dan state (sebuah
qwik/jsonscript) ke HTML, so browser resumes alih-alih hydrating. ini adalah categorically berbeda dari React/Vue/Angular/SolidJS, which semua hydrate. ini adalah pada -nya v2 line (currently beta) sebagai dari ini writing — periksa API terhadap Anda installed versi. - konten adalah di HTML oleh default — untuk routes itu adalah actually server- rendered. SSR/SSG adalah sebuah per-route decision di QwikCity, not sebuah project-wide guarantee. No client re-render langkah pada itu routes → crawler get complete konten dengan no render-wave delay. Confirm pada Anda own deployed URLs dengan view-source alih-alih assuming ini dari framework alone.
- CWV adalah sebuah structural head start, not sebuah guarantee. situs boot dengan ~1 KB dari JS ( Qwikloader — nyata JS itu melakukan run, not zero) regardless dari complexity, so TBT trends toward ~0 dan INP stays rendah when nothing else pada halaman adalah blocking thread. Confirm dengan data lapangan (CrUX / Search Console) — ketiga-party scripts dan route-tingkat data-fetching cost dapat offset advantage.
- QwikCity adalah meta-framework (Next.js untuk Qwik): SSR/SSG mixed per route,
file-sistem routing,
routeLoader$()untuk server-side data. - Metadata lives di
headexport — judul, meta, OG,canonical(dilinks), dan JSON-LD (discripts) — semua server-rendered. untuk dynamic halaman, membuatheadsebuah function fed olehrouteLoader$(); don’t set metadata dari client-side effects.scriptsfield hanya outputs jika Andarouter-headcomponent actually rendershead.scripts— periksa bahwa ini melakukan sebelum trusting JSON-LD menampilkan up. - Sitemaps: automatic di SSG (
sitemapOutFile, limited untuk routes actually dibangun); sebuah dynamicsrc/routes/sitemap.xml/index.tsroute di SSR.robots.txtgoes di/public/. Canonical dan sitemap URLs both depend pada configuredorigin— sebuah leaked preview/staging origin breaks both di production. - i18n:
rewriteRoutesuntuk localized URLs + Qwik Speak untuk konten; hreflang viahead.links. - Watch out: non-serializable data (class instances, promises, streams) adalah
client-hanya, dan sebuah
noSerialize()-wrapped nilai comes backundefinedsetelah resume;useVisibleTask$()runs eagerly pada client dan seharusnya menjadi digunakan sparingly; verify meta tags adalah di view-source, not JS-injected; ecosystem adalah smaller daripada React/Next.js.
Official documentation
Primary-source documentation dari Qwik dan mesin pencari.
Qwik / QwikCity
- Qwik documentation — Overview — docs home; ~1 KB JS dan instant-memuat claims.
- Resumability — canonical explanation dari serialization mechanism dan why ini isn’t hydration.
- QwikCity overview — meta-framework: routing, SSR/SSG, “Next.js for Qwik” (terjemahan) “Next.js untuk Qwik” framing.
- Routing — file-sistem routing,
Linkcomponent’s prefetch, dan route rewrites. - halaman / DocumentHead —
headexport,routeLoader$(), dynamic head, dan data terstruktur. - Sitemaps —
sitemap.xmlgeneration danrobots.txt. - Deployments — adapters, SSR/SSG platforms, dan cache headers.
- JavaScript SEO basics — two-wave rendering dan lazy-dimuat konten di DOM.
- Core Web Vitals — CWV sebagai sebuah sinyal peringkat (INP, LCP, CLS).
Quotes dari source
pada—record framing dari Qwik’s creator dan official docs. Confirm wording terhadap live halaman sebelum treating apa pun quote sebagai akhir.
Miško Hevery — creator dari Qwik, builder.io
- “Hydration is when an application is downloaded and executed twice, once as HTML and again as JavaScript.” (terjemahan) “Hydration adalah when sebuah application adalah downloaded dan executed twice, once sebagai HTML dan again sebagai JavaScript.” — “Resumability vs Hydration,” (terjemahan) “Resumability vs Hydration,” builder.io. Read post
- “Resumability is a way for a framework to recover its state without re-executing the application components on the client.” (terjemahan) “Resumability adalah sebuah cara untuk sebuah framework untuk recover -nya state without re-executing application components pada client.” — “Resumability vs Hydration,” (terjemahan) “Resumability vs Hydration,” builder.io. Read post
- “Hydration must execute before the app becomes interactive. Yes, the execution may be lazy, but the button will not process events until Hydration executes.” (terjemahan) “Hydration harus execute sebelum app becomes interactive. Yes, execution dapat menjadi lazy, tetapi button akan not process events until Hydration executes.” — “Resumability vs Hydration,” (terjemahan) “Resumability vs Hydration,” builder.io. Read post
Qwik official docs (qwik.dev)
- “Your sites and apps can boot with about 1kb of JS (regardless of application complexity).” (terjemahan) “Anda situs dan apps dapat boot dengan tentang 1kb dari JS (regardless dari application complexity).” — Qwik Docs, Overview. Source
- “Qwik apps work instantly without any delay because they don’t need hydration, regardless of their size or complexity.” (terjemahan) “Qwik apps berfungsi instantly without apa pun delay because mereka don’t perlu hydration, regardless dari mereka size atau complexity.” — Qwik Docs, Resumability. Source
- “QwikCity is to Qwik, as Next.js is to React, Nuxt is to Vue, SvelteKit to Svelte, and Analog is to Angular.” (terjemahan) “QwikCity adalah untuk Qwik, sebagai Next.js adalah untuk React, Nuxt adalah untuk Vue, SvelteKit untuk Svelte, dan Analog adalah untuk Angular.” — QwikCity Docs, Overview. Source
- “Thanks to Qwik’s resumability and JavaScript streaming, there is no additional cost to the end user from Qwik City. (zero JavaScript).” (terjemahan) “Thanks untuk Qwik’s resumability dan JavaScript streaming, tidak ada additional cost untuk end pengguna dari Qwik City. (zero JavaScript).” — QwikCity Docs, Overview. Source
Qwik SEO checklist
sebuah pass untuk confirm sebuah QwikCity situs adalah siapkan untuk peringkat:
- Anda’re menggunakan QwikCity ( meta-framework) dengan SSR atau SSG — not bare library di client-hanya mode.
- View-source menampilkan Anda nyata konten dan
<a href>tautan di raw HTML (not sebuah empty shell). - Dynamic halaman data adalah fetched dengan
routeLoader$()(server-side), not sebuah client-side effect. - judul, deskripsi, dan OG tags adalah set via
headexport — dan sebagai sebuah function fed olehresolveValue()untuk dynamic halaman. - Canonical URLs adalah di
head.linkssebagai{ rel: 'canonical', href: '...' }. - JSON-LD adalah di
head.scriptsdengantype: 'application/ld+json'. -
sitemap.xmladalah configured —sitemapOutFileuntuk SSG, atau sebuahsrc/routes/sitemap.xml/index.tsroute untuk SSR. -
robots.txtadalah di/public/. - Cache-Control headers adalah set pada SSR respons (edge SSR untuk rendah TTFB).
- hreflang tags adalah di
head.linksjika situs adalah multilingual; localized URLs viarewriteRoutes. - INP / LCP / CLS verified di field (CrUX / Search Console), not hanya lab.
- No critical konten depends pada non-serializable (class instances, promises, streams) client-hanya code.
mental models
1. Resume, don’t replay. single idea behind Qwik. setiap lainnya mainstream framework replays app di browser (hydration) untuk membuat SSR HTML interactive. Qwik resumes dari state serialized ke HTML, executing ~zero JS pada muat. jika Anda internalize one thing, membuat ini ini.
2. HTML adalah konten. Because there’s no client render langkah, what crawler fetches adalah finished halaman. There’s no kedua wave untuk wait pada, no “did it render?” (terjemahan) “melakukan ini render?” risk. Treat sebuah Qwik halaman like static HTML untuk crawl/indeks purposes.
3. server-side data → metadata.
chain itu decides whether Anda meta tags adalah dapat di-crawl:
routeLoader$() (server) → head export function → HTML <head>. Break
chain oleh fetching di sebuah client effect dan Anda judul/OG/canonical fall out dari
pertama-wave HTML.
4. SSG vs. SSR adalah sebuah hosting/freshness panggil, not sebuah SEO panggil. Both put konten di HTML. Pick SSG untuk static konten (free hosting, auto sitemap) dan SSR untuk per-permintaan data (run ini di edge, cache respons). Crawlability adalah fine either cara.
5. performa win adalah INP/TBT, not crawlability. React/Next.js sudah SSR konten untuk crawler. What Qwik menambahkan adalah absence dari hydration tax — itu’s where -nya CWV advantage lives. Don’t reach untuk Qwik untuk “fix crawling React can’t” (terjemahan) “fix crawling React dapat’t”; reach untuk ini when responsiveness adalah lever.
Qwik SEO — cheat sheet
Where setiap SEO element goes (semua di head export)
| Element | Where | Pattern |
|---|---|---|
| judul | head.title | string (atau function untuk dynamic) |
| deskripsi meta / OG | head.meta | [{ name/property, content }] |
| Canonical | head.links | { rel: 'canonical', href: '...' } |
| hreflang | head.links | { rel: 'alternate', hreflang, href } |
| JSON-LD | head.scripts | { props: { type: 'application/ld+json' }, script } |
| Dynamic data | routeLoader$() | server-side; read via resolveValue() |
SSG vs. SSR untuk SEO
| SSG (static adapter) | SSR | |
|---|---|---|
| konten di HTML | ✅ | ✅ |
| Sitemap | Auto (sitemapOutFile) | tambahkan sebuah /sitemap.xml route |
| Hosting | Static files / CDN | server / edge runtime |
| Best untuk | Stable konten | Per-permintaan / personalized |
| Caching | Inherent | Set Cache-Control yourself |
Resumability vs. hydration ( one distinction itu penting)
| Hydration (React/Vue/Angular/SolidJS) | Resumability (Qwik) | |
|---|---|---|
| browser berfungsi pada muat | Re-execute components | Resume dari serialized state |
| JS pada muat | Scales dengan app | ~1 KB (Qwikloader) |
| TBT / INP | Higher | Near-zero |
| konten di HTML | Yes (dengan meta-framework) | Yes (selalu) |
umum mistakes
- ❌ Setting meta tags dari sebuah client effect → not di pertama-wave HTML. gunakan
head+routeLoader$(). - ❌ Calling Qwik “lazy hydration” (terjemahan) “lazy hydration” → ini doesn’t hydrate di semua; ini resumes.
- ❌ Forgetting sebuah SSR sitemap → SSR memiliki no auto sitemap; tambahkan route.
periksa Qwik’s generated HTML
poin BUILD_DIR di HTML output dari production bangun:
BUILD_DIR=dist
find "$BUILD_DIR" -name '*.html' -type f | while IFS= read -r file; do
titles=$(grep -Eio '<title>[^<]*</title>' "$file" | wc -l | tr -d ' ')
canonicals=$(grep -Eio '<link[^>]+rel=["'"']canonical["'"'][^>]*>' "$file" | wc -l | tr -d ' ')
descriptions=$(grep -Eio '<meta[^>]+name=["'"']description["'"'][^>]*>' "$file" | wc -l | tr -d ' ')
if [ "$titles" -ne 1 ] || [ "$canonicals" -ne 1 ] || [ "$descriptions" -ne 1 ]; then
printf '%s\ttitle=%s\tcanonical=%s\tdescription=%s\n' "$file" "$titles" "$canonicals" "$descriptions"
fi
doneini catches routes whose Qwik City head function adalah missing atau duplicated. ini melakukan not replace memeriksa field performa dan rendered konten pada deployed URLs.
alat untuk auditing sebuah Qwik situs
- View-source (
view-source:di browser) — fastest periksa: adalah Anda konten, judul, canonical, dan JSON-LD actually di raw HTML, atau hanya di rendered DOM? - Google Search Console — pemeriksaan URL — confirm rendered HTML matches
source: konten present, no JS-injected
noindex, canonical resolved. - PageSpeed Insights / CrUX — field Core Web Vitals (INP, LCP, CLS). ini adalah where Qwik’s resumability advantage seharusnya actually tampilkan up.
- Chrome DevTools (performa / Lighthouse) — lab TBT dan main-thread berfungsi; confirm near-zero startup JS dalam praktik.
- Rich hasil Test — validate JSON-LD Anda ditambahkan via
head.scripts. - situs crawler (Ahrefs situs Audit, Screaming Frog) — crawl rendered situs untuk periksa judul, canonicals, hreflang, dan tautan internal di scale.
Mistakes people actually membuat pada Qwik
Resumability menghapus sebagian besar dari JS-SEO risk itu trips up lainnya frameworks, tetapi ini adalah nyata cara teams masih shoot themselves di foot pada Qwik.
Setting metadata dari sebuah client-side effect
** mistake:** pulling sebuah post’s judul atau deskripsi ke sebuah useSignal() atau
useResource$() itu runs di browser, lalu trying untuk atur halaman judul dari
itu nilai.
Why ini adalah wrong: anything computed client-side runs setelah server mengirim -nya respons. ini tidak pernah membuat ini ke HTML Googlebot fetches pada pertama pass — ini hanya menampilkan up di rendered DOM, which adalah exactly render-wave delay resumability adalah supposed untuk hindari Anda.
What untuk melakukan instead: fetch data dengan routeLoader$() (server-side) dan
membuat route’s head export sebuah function fed oleh resolveValue(), sebagai ditampilkan di
Advanced tab. itu’s satu-satunya path itu lands metadata di pertama-wave
HTML.
Running Qwik without QwikCity
** mistake:** menggunakan bare Qwik library di client-hanya mode — no meta- framework, no server rendering — because “resumability doesn’t need hydration so it doesn’t need SSR either.” (terjemahan) “resumability doesn’t perlu hydration so ini doesn’t perlu SSR either.”
Why ini adalah wrong: resumability describes what happens setelah HTML exists. jika nothing renders HTML pada server di pertama place, there’s nothing untuk resume — Anda’re back untuk sebuah empty shell untuk crawler, no berbeda dari apa pun lainnya client-hanya SPA.
What untuk melakukan instead: gunakan QwikCity (atau lainnya server-rendering adapter) untuk anything public-facing. ini adalah what actually produces server-rendered HTML itu gives Qwik -nya SEO advantage.
Assuming SSR gets sebuah automatic sitemap
** mistake:** shipping sebuah SSR Qwik situs dan expecting sitemap.xml untuk
exist because ini “just works” (terjemahan) “hanya berfungsi” di SSG bangun.
Why ini adalah wrong: automatic sitemap adalah sebuah bangun-time fitur dari
static adapter (sitemapOutFile). SSR situs render per permintaan — there’s no
bangun langkah untuk generate sebuah static XML file dari, so nothing produces one unless
Anda tambahkan ini.
What untuk melakukan instead: tambahkan sebuah route di src/routes/sitemap.xml/index.ts dengan
sebuah RequestHandler itu membangun dan mengembalikan XML dynamically, sebagai covered di
Advanced tab.
Putting non-serializable data di anything server perlu untuk resume
** mistake:** storing sebuah class instance, sebuah open promise, atau sebuah stream
reference di state itu head export atau sebuah server-rendered component
depends pada.
Why ini adalah wrong: Qwik’s serialization hanya handles plain, serializable nilai — anything else dapat’t menjadi written ke HTML di SSR time, which breaks exact mechanism (Resumability) itu membuat Qwik’s SEO story berfungsi.
What untuk melakukan instead: pertahankan non-serializable objects client-hanya dan out dari
anything itu feeds metadata atau server-rendered markup. Convert untuk plain data
(sebuah resolved nilai, not promise atau class instance) sebelum ini touches
routeLoader$() atau head.
Calling Qwik “lazy hydration” (terjemahan) “lazy hydration” di sebuah client pitch atau audit note
** mistake:** describing Qwik’s perilaku sebagai sebuah faster atau lazier versi dari hydration when documenting sebuah audit atau briefing sebuah dev team.
Why ini adalah wrong: ini sets wrong expectation — “lazy hydration” (terjemahan) “lazy hydration” implies browser eventually re-executes setiap component, hanya later. Qwik tidak pernah re-executes components pada muat di semua; itu’s whole poin dari resumability, dan distinction perubahan what Anda’d bahkan cari when something’s slow.
What untuk melakukan instead: gunakan “resumes” (terjemahan) “resumes” dan “resumability,” (terjemahan) “resumability,” matching docs’ own terminology, dan periksa Qwikloader’s ~1 KB boot script di DevTools jika Anda perlu prove “no hydration” (terjemahan) “no hydration” claim untuk sebuah skeptical stakeholder.
Standing KPIs untuk sebuah Qwik situs
ini adalah angka untuk track pada sebuah ongoing basis, not sebuah one-time launch periksa — Qwik’s whole nilai proposition adalah sebuah performa dan crawlability story, so both sides perlu sebuah metric.
INP (field)
What ini tells Anda: whether nyata pengunjung adalah actually experiencing rendah-hydration-cost responsiveness Qwik adalah supposed untuk deliver. ini adalah metric Qwik’s architecture adalah sebagian besar directly dibangun untuk win.
cara pull ini: Google Search Console’s Core Web Vitals report, CrUX, atau Patrick’s CWV Checker / Core Web Vitals History & Competitor Comparison untuk sebuah per-URL atau per-origin field read.
Benchmark / realistic range: Google’s published threshold adalah “good” (terjemahan) “baik” di atau di bawah 200ms, “needs improvement” (terjemahan) “perlu improvement” 200–500ms, “poor” (terjemahan) “poor” above 500ms — yang sama threshold untuk setiap situs, not Qwik-spesifik. sebuah resumable situs dengan sebuah clean Qwikloader boot seharusnya sit comfortably di “good,” (terjemahan) “baik,” tetapi sebuah bloated per-interaction chunk atau heavy ketiga-party script dapat masih push ini up.
Cadence: monthly, atau setelah apa pun release itu perubahan interaction handlers; CrUX data itself adalah sebuah rolling 28-day window.
TBT (lab)
What ini tells Anda: how much main-thread berfungsi adalah happening pada muat di sebuah controlled test — ini adalah where Anda’d catch sebuah regression sebelum ini menampilkan up di field INP.
cara pull ini: Lighthouse atau Chrome DevTools’ performa panel, run terhadap live URL (not localhost, where hasil skew rendah).
Benchmark / realistic range: there’s no universal “good Qwik” (terjemahan) “baik Qwik” angka —
ini depends pada what’s pada halaman (ketiga-party scripts, image decode berfungsi,
route-tingkat routeLoader$() cost). What Anda’re memeriksa untuk adalah itu TBT
stays near-zero relative untuk sebuah hydrating equivalent dari yang sama halaman, not
terhadap sebuah fixed target.
Cadence: sebelum/setelah apa pun deploy itu menambahkan sebuah ketiga-party script, analytics tag, atau baru interactive component.
terindeks halaman coverage
What ini tells Anda: whether Google adalah actually crawling dan pengindeksan halaman Anda expect — practical proof itu “content is in the HTML by default” (terjemahan) “konten adalah di HTML oleh default” adalah translating ke pengindeksan, not hanya sebuah theoretical advantage.
cara pull ini: Search Console’s halaman pengindeksan report, filtered untuk Qwik situs’s URL prefix; cross-periksa terhadap Anda sitemap’s submitted-URL count.
Benchmark / realistic range: depends entirely pada situs size dan how much dari ini Anda intend untuk memiliki terindeks — there’s no fixed target. Track trend (terindeks count moving toward submitted count) alih-alih chasing sebuah spesifik angka.
Cadence: weekly selama dan setelah sebuah migration untuk Qwik; monthly once stable.
JS transferred pada muat
What ini tells Anda: whether “boots with ~1 KB” (terjemahan) “boots dengan ~1 KB” claim adalah holding up di practice, atau whether ketiga-party scripts dan oversized initial chunks memiliki eaten ke Qwik’s structural advantage.
cara pull ini: Network panel di Chrome DevTools, filtered untuk JS, pada sebuah cold muat dengan cache disabled.
Benchmark / realistic range: Qwikloader itself adalah roughly 1 KB; anything meaningfully larger pada initial muat adalah coming dari something else pada halaman (analytics, ads, sebuah polyfill) — investigate alih-alih compare terhadap sebuah fixed angka, since halaman-untuk-halaman variance adalah expected.
Cadence: setelah apa pun perubahan untuk ketiga-party tags, analytics, atau shared layout components.
Test yourself: Qwik SEO
Five quick pertanyaan pada resumability dan getting sebuah QwikCity situs untuk peringkat. Pick sebuah jawaban untuk setiap, lalu periksa.
Resources worth Anda time
My related writing
- JavaScript SEO: sebuah Definitive Guide — rendering, DOM parity, dan getting JS-dibangun konten terindeks; foundation sebuah Qwik audit membangun pada.
- Core Web Vitals: sebuah Complete Guide — what INP, LCP, dan CLS mengukur dan how mereka factor ke SEO — metrics Qwik’s architecture optimizes.
- Beginner’s Guide untuk SEO teknis — where framework choice dan rendering fit di bigger picture.
My speaking
- How Search berfungsi (SlideShare) — my walkthrough dari crawling, rendering, pengindeksan, dan peringkat — pipeline sebuah Qwik situs memiliki untuk jelas. (My standing disclaimer applies: “This is my understanding of systems… not going to be 100% complete or accurate.” (terjemahan) “ini adalah my understanding dari sistem… not going untuk menjadi 100% complete atau accurate.”)
dari sekitar industry
- Qwik — Resumability — clearest primary-source explanation dari how serialization replaces hydration.
- QwikCity overview — meta-framework: routing, SSR/SSG, loaders.
- Qwik — halaman / DocumentHead —
headexport,routeLoader$(), dynamic head, dan data terstruktur. - Qwik — Sitemaps — sitemap.xml generation dan robots.txt.
- Builder.io — Resumability vs Hydration — Miško Hevery pada why hydration adalah “executed twice” (terjemahan) “executed twice” dan how resumability menghindari ini.
- Google — JavaScript SEO basics — two-wave rendering dan what crawler melakukan dengan JS.
- r/TechSEO — community untuk debugging framework rendering dan pengindeksan pertanyaan.
Log perubahan
Diperbarui 18 Jul 2026.
Ringkasan editorial dan detail perubahan yang tercatat.Detail perubahan
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
-
Catatan perubahan terperinci saat ini tersedia dalam bahasa Inggris.
Perbandingan lengkap tidak tersedia — tidak ada cuplikan sebelumnya yang diarsipkan untuk revisi ini.