A quick way to visit a random page on MDN Developer kkipp built a Cloudflare Worker that redirects visitors to a random page on MDN by fetching MDN's gzipped sitemap at https://developer.mozilla.org/sitemaps/en-us/sitemap.xml.gz, parsing the XML with xml2js, and issuing a 302 redirect to a randomly indexed URL. The tool is live at https://mdn-random.kkipp.workers.dev, and the author said GitHub Copilot let him build it in less than 10 minutes, with the Json2TS Raycast extension used to generate TypeScript interfaces for the parsed XML. A quick way to visit a random page on MDN Maybe in the vein of Chris Coyier’s post on A /random Route on a WordPress Site https://chriscoyier.net/2023/11/29/a-random-route-on-a-wordpress-site/ , I found myself kinda interested in being able to just go to a random page on MDN. I didn’t find an obvious existing feature for this, so I hacked one together. It’s pretty simple — it fetches MDN’s sitemap, parses the XML, and grabs a random URL then redirects to it. https://mdn-random.kkipp.workers.dev https://mdn-random.kkipp.workers.dev I love Copilot https://github.com/features/copilot for this kind of stuff. I had this thing built in less than 10 minutes. This Json2TS Raycast extension http://www.raycast.com/gbarba/json2ts was also pretty helpful for generating TS interfaces for the parsed XML. Here’s the complete code: python import xml2js from "xml2js"; export interface Env {} interface Sitemap { urlset: Urlset; } interface Urlset { $: $; url: UrlItem ; } interface $ { xmlns: string; } interface UrlItem { loc: string ; lastmod: string ; } export default { async fetch request: Request, env: Env, ctx: ExecutionContext, : Promise