{
  "id": 7956091,
  "title": "Two Cloudflare Pages behaviours I had to measure to believe",
  "url": "https://urgent.news/2026/09/17/two-cloudflare-pages-behaviours-i-had-to-measure-to-believe",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-17T05:16:02.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ankit_gupta_37c6b9df66fb7/two-cloudflare-pages-behaviours-i-had-to-measure-to-believe-4gki"
  },
  "original_language": "en",
  "account": "Two Cloudflare Pages behaviors proved challenging to comprehend. The first issue involves the Cache-Control in _headers being disregarded for static assets. After deploying a new version, different pages displayed varying counts of games, indicating stale content. Adding a Cache-Control rule did not resolve the issue, as the platform silently applied its own Cache-Control settings for static files. The solution lies in incorporating content hashes in the URL, ensuring the HTML files are updated with new versions upon deployment. Another obstacle pertains to the _redirects rule limit. Despite the documentation suggesting a limit of 2,000 static and 100 dynamic redirects, the actual limit appears to be around 100 rules. Any rules added beyond this threshold are disregarded, leading to unintended consequences. To mitigate this issue, it is advisable to keep the _redirects file under 100 rules, with the most critical rules listed first. Regular monitoring of the _redirects file using a single curl -sI command after each deployment can help ensure all rules are being properly applied. Additionally, it is crucial to verify the deletion of stale pages to avoid lingering responses. This can be done through a simple cache-buster test. The writer emphasizes the importance of thoroughly testing the _redirects file, as a single deleted page can still return a 200 response for up to a week, potentially misleading developers into believing a deployment has failed.",
  "summary": "I run a static browser-games site on Cloudflare Pages: about 4,700 prerendered HTML files, a small React shell, no server. Two things cost me days because the platform did not fail loudly. Both are easy to reproduce, so here are the measurements rather than opinions. 1. Cache-Control in _headers is ignored for static assets The symptom: after a deploy, one page said the catalogue had 211 games…",
  "key_points": [
    "Cache-Control in headers ignored for static assets, causing stale content.",
    "redirects rule limit likely around 100, beyond which rules are disregarded.",
    "Regular monitoring and cache-busting tests crucial to ensure proper rule application."
  ],
  "editors_take": "Cloudflare Pages' handling of Cache-Control and redirects rules can override developer settings, requiring workarounds like content hashes and limited redirects to ensure correct content delivery and redirects.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}