Couldn't you just download the Google fonts and serve them up yourself and use a Cloudflare rule to cache it on the edge, instead of going through all this work?
Maybe it's because I just skimmed the article, but what about the security implications of this? Doesn't dynamically loading third party ressources and serving them under your own domain open a whole can of worms?
> An alternative would be to keep accumulating data and only process it when there is no split link tag at the end, but this way we can return more data to the browser sooner.<p>> One thing I was initially worried about was having to modify the “content-length” response header from the original response since we are modifying the content. Luckily, the worker takes care of that automatically and it isn’t something you have to implement.<p>If the worker is able to do this for you it’s clearly waiting for all of the incoming data to be processed before it begins sending to the browser, so dealing with the incoming data as chunks is actually needlessly complex.
What about caching? The static font files have a really long cache age. You don't consider anywhere that the user might already have the font file.