Routes & Layouts
How a URL becomes a page: segments matched from the file tree, a chain of nested shells, and navigation between them without a document load. Asked because the model decides what re-runs on each move.
on this pageshowhide
explore
- File-Based Route Conventions6 questions
- Persistent Nested Layouts5 questions
- Client Navigation & Prefetching6 questions
- Route Metadata & Head6 questions
- Redirects, Rewrites & Errors5 questions
- Locale Segments & Detection5 questions
questions
page 2 of 2How do you decide whether a site's redirects belong in a build-declared table or in per-request code?
level: principalimportance: should knowfreq 42%
basics
~20 sStart from what the rule needs to know. Path-only rules belong in the declared table, where they are cheap, cacheable and reviewable. Rules depending on identity, experiment or database state need per-request code, paying compute and cacheability for that access.
Your streamed pages flush the shell early, but a deep segment resolves a head tag late. How do you decide what to do?
level: principalimportance: nice to knowfreq 40%
basics
~20 sDecide by who must see the tag. The head leaves in the first bytes and cannot be edited afterwards in-band, so the choices are: delay the flush, resolve the head in an earlier pass, move the declaration up, or inject late for browsers only.
showing 31–33 of 33