Dev builds bilingual browser cooking game using Astro and Cloudflare edge caching
A developer has launched Cá Viên Chiên, a mobile-friendly browser game about Vietnamese fried fish ball street carts, available in both English and Vietnamese. Built with Astro, the project uses a single vanilla JavaScript island of around 26 KB with no framework runtime, keeping the site lightweight and SEO-friendly via static HTML pages. Game progress is saved to localStorage and transferred between devices using a copy-paste save code, requiring no backend or user accounts. The main technical challenge was caching HTML at Cloudflare's edge, as pages initially showed dynamic responses with high origin latency despite cache rules being in place. The fix involved using the CDN-Cache-Control header to set a 24-hour edge TTL independently of browser cache headers, with cache purges triggered on each deployment to ensure fresh content.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in