edge-and-cdn-delivery

Configure CDN caching, cache headers, and edge delivery patterns for web origins.

Updated Dec 29, 2025
One-click install
npx skills add https://github.com/snoodleboot-io/discrecontinual_equations --skill edge-and-cdn-delivery-snoodleboot-io
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: edge-and-cdn-delivery
Source: https://github.com/snoodleboot-io/discrecontinual_equations/tree/main/.claude/skills/edge-and-cdn-delivery
Command: npx skills add https://github.com/snoodleboot-io/discrecontinual_equations --skill edge-and-cdn-delivery-snoodleboot-io

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often enable a CDN in front of an origin and see no benefit because the origin sends no-store or missing cache headers, the cache key is polluted by tracking parameters, or deploys depend on slow purges. This Skill provides the patterns and checklists needed to make edge caching actually work. ## Core Features & Use Cases - Cache-Control Design: Set max-age, s-maxage, immutable, and stale-while-revalidate correctly per content type so browsers and shared caches behave as intended. - Cache Key and Vary Hygiene: Strip non-significant query parameters and avoid Vary: Cookie or Vary: User-Agent so hit rates do not collapse. - Fingerprinting and Invalidation Strategy: Use content-hashed asset filenames to eliminate routine purges, reserving purge for emergencies only. - Origin Protection and Edge Compute Guidance: Apply origin shielding against thundering herds and scope edge functions to routing, auth, and header shaping. - Use Case: Before launching a site behind CloudFront or Cloudflare, run the delivery checklist to verify every content type has an intentional Cache-Control policy and measure the edge hit rate. ## Quick Start Review my origin's cache headers and CDN configuration and tell me what to change to improve edge cache hit rate.

Frequently Asked Questions about edge-and-cdn-delivery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Cache-Control headers for a CDN?▼

Set max-age for browser caching and s-maxage for the shared CDN cache independently. Use public, max-age=31536000, immutable for fingerprinted assets, and short s-maxage with stale-while-revalidate for dynamic HTML.

Why is my CDN cache hit rate so low?▼

Low hit rates usually come from tracking query parameters in the cache key, Vary: Cookie or Vary: User-Agent forking the cache per user, or the origin sending no-store. Strip non-significant parameters and limit Vary to headers that change the body.

Should I purge the CDN cache on every deploy?▼

No. Purges are eventually consistent across edge locations and often rate-limited, making purge-dependent deploys fragile. Use content-hashed asset filenames so new versions get new URLs, and reserve purges for emergencies like leaked content.

What is the difference between max-age and s-maxage?▼

max-age controls how long the browser may reuse its copy, while s-maxage controls how long a shared cache like a CDN may reuse it. s-maxage overrides max-age for the CDN only, letting you set a short edge TTL with a longer browser TTL.

What workloads belong in edge functions versus the origin?▼

Edge functions suit routing, redirects, auth token checks, A/B routing, and header shaping. Avoid database calls and CPU-heavy work at the edge, since distance from your data and runtime CPU limits erase the latency benefit.

How do I prevent a thundering herd against my origin?▼

Enable origin shielding or tiered caching so a single mid-tier cache fetches from origin and fans out to edge PoPs. Combine with stale-while-revalidate so expired objects are served while the edge refreshes in the background.