Files
2nd/10_Wiki/Topics/Frontend/콘텐츠 기반의 이커머스 및 뉴스 웹사이트 성능 튜닝.md
T
Antigravity Agent f8b21af4be Wiki cleanup: error-doc removal, dedup merge, link normalization
10_Wiki/Topics 대규모 정리:
- 오류 캡처/미완성 stub 문서 227개 제거
- 교차폴더 중복 43클러스터 병합 (63파일 → redirect)
- 링크명 정규화: 깨진 링크 수정·redirect 직결·개념 매핑 ~2,400건
- 카테고리 MOC 6개 신규 생성
- Graph 섹션 미해결 related-keyword 링크 10,058건 제거

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 23:52:15 +09:00

4.9 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-콘텐츠-기반의-이커머스-및-뉴스-웹사이트-성능-튜닝 콘텐츠 기반의 이커머스 및 뉴스 웹사이트 성능 튜닝 10_Wiki/Topics verified self
Content Site Performance
E-commerce Tuning
News Site Tuning
none A 0.9 applied
frontend
performance
ecommerce
news
isr
edge-caching
2026-05-10 pending
language framework
typescript nextjs

콘텐츠 기반의 이커머스 및 뉴스 웹사이트 성능 튜닝

매 한 줄

"매 이커머스 와 뉴스 는 매 LCP 와 매 traffic spike 가 매 매출 / engagement 에 매 직결". 매 1 초 LCP 개선 = Amazon $1B/yr (고전), Pinterest +15% conversion. 매 2026 stack — Next.js 15 + ISR + Edge / CDN + Image optim — 가 매 default playbook.

매 핵심

매 두 도메인 의 차이

  • 이커머스: 매 product page 의 매 LCP (image), 매 PDP 의 매 INP (variant select), 매 cart 의 매 freshness.
  • 뉴스: 매 article 의 매 LCP (cover image / headline), 매 publishing speed (ISR ≤ 60s), 매 ad / tracker 부하.

매 핵심 lever

  • ISR (Incremental Static Regeneration): build-time SSG + runtime revalidate.
  • Edge caching: Vercel / Cloudflare / Fastly 의 매 stale-while-revalidate.
  • Image CDN: Cloudinary / imgix / Next Image — 매 AVIF + responsive.
  • Streaming SSR: RSC + Suspense → 매 TTFB 개선.
  • Third-party tax 최소화: GTM / pixel — 매 Partytown 또는 server-side tracking.

매 응용

  1. Shopify Hydrogen / Next Commerce.
  2. NYT, WaPo, Bloomberg 식 article.
  3. Medium / Substack 식 long-tail.

💻 패턴

ISR (Next 15)

// app/products/[id]/page.tsx
export const revalidate = 60; // 매 60초 ISR

export default async function Product({ params }) {
  const product = await getProduct(params.id);
  return <ProductView product={product} />;
}

export async function generateStaticParams() {
  const top = await getTopProducts(1000); // 매 top 1000 prebuild
  return top.map(p => ({ id: p.id }));
}

On-demand revalidation

// app/api/revalidate/route.ts
import { revalidatePath } from "next/cache";

export async function POST(req: Request) {
  const { path, secret } = await req.json();
  if (secret !== process.env.REVALIDATE_SECRET) return new Response("nope", { status: 401 });
  revalidatePath(path);
  return Response.json({ revalidated: true });
}

Streaming SSR (RSC + Suspense)

export default function ArticlePage({ params }) {
  return (
    <>
      <ArticleHeader id={params.id} /> {/* 매 즉시 stream */}
      <Suspense fallback={<CommentsSkeleton />}>
        <Comments id={params.id} /> {/* 매 below-fold */}
      </Suspense>
    </>
  );
}

Edge runtime (latency 최소)

export const runtime = "edge";

export default async function Page() {
  const data = await fetch("https://api...", { next: { revalidate: 30 } });
  return <View data={await data.json()} />;
}

Image responsive + priority

<Image
  src={product.cover}
  alt={product.name}
  width={800} height={600}
  sizes="(max-width: 768px) 100vw, 50vw"
  priority={isAboveFold}
  quality={80}
/>

Partytown (3rd-party off main thread)

import Script from "next/script";

<Script src="https://www.googletagmanager.com/gtm.js?id=GTM-XXX"
        strategy="worker" />

Cache header (CDN-friendly)

return new Response(html, {
  headers: {
    "Cache-Control": "public, s-maxage=60, stale-while-revalidate=600",
  },
});

매 결정 기준

페이지 타입 전략
Product Detail (top seller) SSG + ISR(60s) + Edge
Product Detail (long tail) SSR streaming
Cart / Checkout SSR (no cache, fresh)
News article SSG + ISR(30s) + on-demand
Live ticker RSC + WebSocket

기본값: Next 15 App Router + ISR + Edge runtime + Next/Image + Partytown.

🔗 Graph

🤖 LLM 활용

언제: 매 traffic-heavy content site, 매 PLP/PDP, 매 article-driven SEO. 언제 X: 매 internal admin, 매 auth-only SaaS.

안티패턴

  • Cart 까지 ISR: 매 stale price → 매 trust 붕괴.
  • 3rd-party 30+ scripts on main thread: 매 INP 폭주.
  • Image 원본 그대로: 매 5MB JPG → LCP 5초.
  • ISR revalidate 너무 짧음 (1s): 매 origin 부하.

🧪 검증 / 중복

  • Verified (Vercel docs, web.dev case studies, Cloudflare Workers).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — content site tuning playbook