惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
Google DeepMind News
Google DeepMind News
腾讯CDC
G
Google Developers Blog
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
aimingoo的专栏
aimingoo的专栏
有赞技术团队
有赞技术团队
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
M
MIT News - Artificial intelligence
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
美团技术团队
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志

Flags SDK Documentation

Global Config Bulk Evaluation Evaluation Context Precompute GrowthBook Hypertune PostHog Split Evaluation Context Quickstart Precompute Evaluation Context Quickstart Precompute GrowthBook Hypertune PostHog Split Proxy Dashboard Pages Marketing Pages Dashboard Pages Marketing Pages Data Locality Providers LaunchDarkly Optimizely Reflag Statsig Flags as Code
Server-side vs Client-side
Vercel · 2026-04-03 · via Flags SDK Documentation

We strongly believe feature flags should be used server-side.

When a feature flag is used on the client side, it can cause layout shifts and jank. The application needs to wait until the feature flags are bootstrapped over the network. In the meantime it has to take one of two bad choices:

  • Show a loading spinner
  • Speculatively show one version of the page

But if the feature flag turns out to have a different value, the page needs to be swapped out leading to jank.

When you use feature flags server-side, this problem is avoided. The server will only send the version of the page that matches the feature flag. No layout shift or jank.

Keeping pages static

A big benefit using client-side feature flags is that the page itself can stay fully static. Having static pages is great, as they can be served by the CDN around the world which has incredibly low latency globally.

A common misconception is that server-side usage of feature flags means that the page can no longer be static. This is not the case. The Flags SDK comes with multiple patterns which allow keeping the page static without falling back to client-side usage.

These patterns are made possible by using Routing Middleware. One or multiple feature flags can be evaluated in Routing Middleware, and the request can then be rewritten to serve a statically generated version of the page. This combines extremely well with Incremental Static Regeneration (ISR).

See the Marketing Pages example

Using feature flags on the client typically means the name of the feature flag is sent to the client. Often times teams then fall back to using cryptic alias for their feature flags in order to avoid leaking features.

When feature flags are used server-side, only the necessary code is sent to the client. In contrast, when using feature flags client-side it is common that both versions of the page are sent to the client, which leads to an increased bundle size.