BizzPocket

Limits reference

On this page

Every limit and allowlist a theme meets, with its value, what happens past it, and the file that defines it. Each value is read from that file when this page is generated, so the page cannot drift from the code. For the reasoning behind them, read Limits and security.

Fields and content

Limit Value Past it / notes Defined in
f.richText() length 200,000 The whole value reads the field default (never cut mid-tag). A field may set its own maxLength. src/props.ts RICH_TEXT_MAX
Rich-text nesting depth 256 Deeper open elements are flattened: the tag is dropped, its text kept. src/sanitize.ts MAX_DEPTH
Table colspan / rowspan 1,000 Values outside 1 to this, or not whole numbers, are dropped. src/sanitize.ts
f.products() / f.categories() / f.collections() items 50 Extra items are dropped (also on the server, l coercion). A field may set its own max. src/props.ts RESOURCE_LIST_MAX
f.blocks() children 24 Extra saved children are not rendered. A field may set its own max. src/fields.ts BLOCKS_MAX
Container nesting 3 Children deeper than this many levels below a top-level block are not rendered (the renderer logs it). src/schema.ts MAX_NESTING_DEPTH
f.list() items no cap by default No cap unless the field sets max; then extra items are dropped. src/props.ts

Rich-text sanitiser

Every f.richText() value is rebuilt from parsed tokens before render sees it. Allowed tags are emitted bare, except a (href when it is a safe URL; target="_blank" gets rel="noopener noreferrer") and th/td (numeric colspan/rowspan). No style, class, id or event attribute ever survives.

Limit Value Past it / notes Defined in
Allowed tags p, br, strong, em, b, i, u, s, a, ul, ol, li, h2, h3, h4, h5, h6, blockquote, table, thead, tbody, tfoot, tr, th, td, caption, span, code, pre, hr, sup, sub, small Any other tag is unwrapped: the tag goes, its text stays. src/sanitize.ts ALLOWED
Dropped with their content script, style, iframe, object, template, noscript, textarea Removed together with everything inside. src/sanitize.ts DROP_CONTENT

Safe URLs

Applied to f.link(), f.image(), f.video(), rich-text links, and by toSafeUrl() for links that come from data.

Limit Value Past it / notes Defined in
Link schemes (f.link(), rich text, toSafeUrl) https:, mailto:, tel: Also allowed: a root-relative path (not // or /\) and a #anchor. Anything else (http:, javascript:, data:, control characters) reads the default / null. src/safe-url.ts LINK_SCHEMES
Media sources (f.image(), f.video(), gallery) https: Or root-relative. Anything else reads the default (undefined). src/safe-url.ts
f.color() values /^(?:#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|(?:rgba?|hsla?)\(\s*[\d.]+(?:deg)?%?(?:\s*[,/ ]\s*[\d.]+%?){2,3}\s*\)|var\(--[\w-]+\))$/i A non-matching value reads the default. src/props.ts SAFE_COLOR

Route values

Limit Value Past it / notes Defined in
Route filters per page 16 Search params after this many are ignored. src/route.ts MAX_FILTERS
Route filter key /^[A-Za-z][\w.-]{0,39}$/ A param whose key does not match is not a filter. src/route.ts FILTER_KEY
Route filter value length 200 A longer value is dropped. src/route.ts MAX_VALUE
Params that are never filters q, page, sort, handle, pageType, block, bizz_preview, fbclid, gclid, msclkid, ref Plus every utm_*. src/route.ts DROPPED_PARAMS
Search q length (Bun runtime) 200 A longer q is dropped. src/server.ts MAX_VALUE
Handle in the URL /^[\w-]{1,200}$/ Another shape is a 404. src/server.ts HANDLE

Browser queries

useQuery and GET /_bp/q/<op>?v=<json>.

Limit Value Past it / notes Defined in
Variables (v, JSON before URL encoding) 4,096 bytes (4 KB) useQuery fails with VARS_TOO_LARGE before sending; the route answers 413 VARS_TOO_LARGE. client/query.ts MAX_QUERY_VARS_BYTES
Cached results per tab 100 The oldest result is forgotten. client/query.ts MAX_QUERY_CACHE_ENTRIES
Ops the browser may run productGridProducts, productSearch, productDetail, productSuggestions, productFrames, categoryTree, categoryTreeWithFeatured, categoryFilters, navigationMenu, storeProfile, storeHome, storePromotions, gemCertificate Any other op is 404 NOT_FOUND; shopper (customer*) ops and mutations are not reachable through the route, even if added to the list. client/query.ts BROWSER_QUERY_OPS
Op name /^[A-Za-z][A-Za-z0-9]{0,63}$/ 404 NOT_FOUND. src/operations.ts OP_NAME
Cache-Control (with or without a cookie) 'public, max-age=30, stale-while-revalidate=60' Public operations run without the shopper's session, so a request with a cookie gets the same answer and header (vary: accept-encoding); errors are no-store. src/server.ts QUERY_CACHEABLE

Cart actions

Limit Value Past it / notes Defined in
Cart action timeout 15,000 ms (15 s) The Promise rejects with TIMEOUT. client/cart-actions.ts CART_ACTION_TIMEOUT_MS
Cart-line attributes per line 5 Extra keys are dropped. src/line-attributes.ts MAX_LINE_ATTRIBUTES
Cart-line attribute length 120 Cut to this many characters. src/line-attributes.ts MAX_LINE_ATTRIBUTE_LENGTH
Cart-line attribute key /^[a-z][a-z0-9_]{0,39}$/ Another key is dropped. src/line-attributes.ts KEY_RE

Data and rendering (Bun runtime)

Defaults of createServer / startRender options; a host may set others.

Limit Value Past it / notes Defined in
load() timeout 3,000 ms (3 s) The block renders with empty data ({} from load(); a static block waiting for its need lines reads them as missing): render your empty state. The page is marked degraded and not cached. src/render.tsx DEFAULT_LOAD_TIMEOUT_MS
Render deadline 8,000 ms (8 s) Missing needs resolve to null (page degraded) and the React render is aborted after a short grace. src/render.tsx DEFAULT_RENDER_DEADLINE_MS
Abort grace after the deadline 250 ms The stream is aborted. src/render.tsx ABORT_GRACE_MS
Shell hold (cacheHoldMs) 400 ms Headers go out without the done line: the page is sent no-store instead of cacheable. src/server.ts DEFAULT_CACHE_HOLD_MS
Storefront GraphQL request 5,000 ms (5 s) That op resolves to null. src/operations.ts DEFAULT_GRAPHQL_TIMEOUT_MS
Page endpoint request 10,000 ms (10 s) The page is a 503. src/page-client.ts DEFAULT_PAGE_TIMEOUT_MS
Inline global CSS (gzip) 14,336 bytes (14 KB) CSS is linked (?v=<hash>, immutable) instead of inlined. src/render.tsx DEFAULT_INLINE_GLOBAL_CSS_MAX_GZIP
Page endpoint body (backend) 16,777,216 bytes (16 MB) 413. src/route.rs MAX_BODY_BYTES

Caching

Page responses of the Bun runtime. Public operations run without the shopper's cookie, so a page that uses only them is shared. A page whose load(), runtime or fallback data ran a shopper-scoped call (customer*, or a gql() document that is not all public) is private, with or without a cookie; a preview (bizz_preview) or degraded page is never cached.

Limit Value Past it / notes Defined in
Cacheable page 'public, s-maxage=60, stale-while-revalidate=600' Used when there is no preview token and the page finished within the shell hold, not degraded. src/server.ts CACHEABLE
Personal page 'private, no-store' A shopper-scoped call ran, or a shopper page (account, orders, cart, wishlist, login, signup). vary: cookie is set only for personal pages and previews. src/server.ts PRIVATE
Everything else 'no-store' Errors, previews, degraded pages. src/server.ts NO_STORE
Theme assets (client/, css/) 'public, max-age=31536000, immutable' Content-hashed files only; others get public, max-age=300. src/server.ts IMMUTABLE

CSP and nonce

Limit Value Past it / notes Defined in
Content-Security-Policy style-src 'self' 'unsafe-inline'; script-src 'self' 'nonce-${nonce}' 'strict-dynamic'; object-src 'none'; base-uri 'none' Inline scripts without the page nonce do not run. Do not inline <script> in a block; use an island or SIR. src/server.ts
Nonce shape /^[A-Za-z0-9+/_=-]{16,128}$/ A host passing another nonce gets an error. src/html.ts NONCE
Appearance CSS variable name /^-{0,2}[A-Za-z_][\w-]{0,80}$/ The override is dropped. src/html.ts CSS_VAR_NAME
Appearance CSS variable value length 500 Longer values, or values with ;{}<>\"' or comments, are dropped. src/html.ts

Islands

Limit Value Past it / notes Defined in
hydrate values load, idle, visible Another value falls back to the default. src/island.tsx HYDRATE
Default hydrate 'visible' Islands wake when they come near the screen. src/island.tsx DEFAULT_HYDRATE
idle fallback 5,000 ms (5 s) Without requestIdleCallback, idle islands wake after this. src/client.ts IDLE_FALLBACK_MS
Island props typeof v === 'function' || typeof v === 'symbol' || typeof v === 'bigint' Props are JSON: functions, symbols, bigints and React elements are dropped at render, and the build rejects them up front (NON_SERIALIZABLE_ISLAND_PROP). src/island.tsx
Imports an island may not use /^(@bizzpocket\/theme-sdk|zod)(\/.*)?$/ CLIENT_IMPORT_FORBIDDEN. build/resolve.ts CLIENT_FORBIDDEN

Images: the CDN width ladder

Limit Value Past it / notes Defined in
CDN widths [160, 320, 480, 640, 960, 1280, 1600] Requested widths snap up onto the ladder; an off-ladder width costs a redirect. src/responsive-image.ts WIDTH_LADDER
Largest width 1,600 The CDN never upscales. src/responsive-image.ts MASTER_WIDTH
srcset widths (responsiveImage, <Image>) [320, 480, 640, 828, 1080, 1280, 1600] Each is snapped onto the ladder for BizzPocket CDN images. src/responsive-image.ts RESPONSIVE_WIDTHS
Named sizes { sm: 400, md: 800, lg: 1600 } sm/md/lg leaves map to these widths. src/responsive-image.ts NAMED_LEAF_WIDTH

Storefront GraphQL

Applied to every storefront document (gql(), load(), /_bp/q), before any resolver runs.

Limit Value Past it / notes Defined in
Depth 10 The document is rejected. plugins/query_protection.rs
Cost 5,000 Rejected. Heavy roots cost more (productSearch 15, productGridProducts 10...); a literal page size multiplies its children. plugins/query_protection.rs
Aliases 15 Rejected. plugins/query_protection.rs
Root cost per document 50 Rejected: a document cannot fan out into many heavy root fields. plugins/query_protection.rs

Developer tokens

Limit Value Past it / notes Defined in
Requests per token per minute 120 429 RATE_LIMITED with retryAfter. One unit per request plus one per op a page runs. src/dev_tokens.rs RATE_LIMIT_PER_MIN
Ops per page call 32 Further operations of that page call fail and their needs resolve to null. src/dev_tokens.rs MAX_PAGE_OPS
Live tokens per store 10 422 DEV_TOKEN_LIMIT: revoke one first. src/dev_tokens.rs MAX_TOKENS_PER_STORE
Default lifetime (days) 90 The token expires (401). src/dev_tokens.rs DEFAULT_TTL_DAYS
Longest lifetime (days) 365 400 INVALID_DEV_TOKEN. src/dev_tokens.rs MAX_TTL_DAYS
Token name length 60 400 INVALID_DEV_TOKEN. src/dev_tokens.rs MAX_NAME
Token prefix "bpdt_" A token without it is not a developer token. src/dev_tokens.rs TOKEN_PREFIX