News for hackers. Stuff that matters.
Re:Introducing the HTMLRewriter API Beta to Cloudflare Workers by CherryJimbo on Monday September 30, 2019 @02:26PM (#21118252)
This is seriously cool. From Twitter (https://twitter.com/KentonVarda/status/1178723944007733251):

> Not only does this use (much) less overall CPU and RAM, but it avoids delaying TTFB. Also elements you want to modify are selected using CSS selector syntax which makes things nice and easy. It may seem like a small thing to some but I'm pretty excited about this.

Previously I was doing things like fetching content, running some regex replaces, and then returning the changed content. Being able to do this dynamically and in real-time without delaying TTFB is incredible.

Re:Introducing the HTMLRewriter API Beta to Cloudflare Workers by adamschwartz on Monday September 30, 2019 @03:50PM (#21119065)
Check out https://web.scraper.workers.dev for an example of HTMLRewriter in action! Here’s the gist of it: https://git.io/Jen4K.