Commit 25e5ecd
Prevent page caches from storing content-negotiation redirect
Full-page caches (LiteSpeed Cache, WP Super Cache, etc.) ignore
the Vary: Accept header and cache the 303 redirect keyed by URL
alone, causing all visitors to be redirected to the .md URL.
Add three cache-prevention layers before the redirect:
- DONOTCACHEPAGE constant (universal WP cache convention)
- Cache-Control: private, no-store (HTTP standard for proxies/CDNs)
- litespeed_control_set_nocache action (LSCWP API, no-op if inactive)
The .md URLs themselves remain fully cacheable.
Fixes #30
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 15738a8 commit 25e5ecd
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
375 | 385 | | |
376 | 386 | | |
377 | 387 | | |
| |||
0 commit comments