This week in caching: a 10-minute audit for accidentally-uncacheable pages
Run this checklist before you tune anything fancier.
— Grep responses for Set-Cookie — one analytics or A/B plugin setting a cookie on every page makes the whole site bypass the cache.
— Check for no-store leaking out — a framework default of Cache-Control: no-store, private on routes that should be public is the silent #1 cause.
— Find session_start() on public pages — starting a PHP session emits a cookie and an uncacheable header even on anonymous pages.
— Look for max-age=0 — often left from debugging; it disables caching while looking harmless.
— Scan for personalized output in shared HTML — a 'Hello, guest' that's actually 'Hello, $name' means you can never cache it.
Credit to Harry Roberts' (csswizardry) cache-header audits — his curl one-liners are gold.
Bookmark: csswizardry's 'Cache-Control for Civilians' — the most readable header primer.
Cache Catch
@CacheCatch
This week in caching: a 10-minute audit for accidentally-uncacheable pages
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.