Cache-busting JSON in PHP with filemtime
The blog listing loads articles via fetch('posts.json'). Problem: the browser caches this file. When you publish a new article, visitors keep seeing the old list until they manually clear their cache — which they never do. Why the browser caches the JSON Without an explicit Cache-Control directive, Apache applies a heuristic: it estimates a cache duration from the file's Last-Modified header. In practice, browsers can keep the file cached for several hours, or even several days depen...
Original Source
Read the full article at Dev →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.