Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

Prototyping optimizations with Cloudflare Workers and WebPageTest

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Andrew Galloni
Word Count
1,270
Company Posts That Month
14
Language
English
Hacker News Points
-
Post removed?
No
Summary

This article discusses how to use a combination of WebPageTest and Cloudflare Workers for quick testing of new performance ideas or evaluating the latest performance wisdom. The author explains that setting up another internet-facing server can be time-consuming, but using these two technologies allows for rapid iteration and review of different experiments. Cloudflare Workers is a lightweight JavaScript execution environment that enables developers to modify requests and responses without maintaining infrastructure. It provides an event-based fetch API similar to the Service Worker API in browsers. WebPageTest, on the other hand, can re-point arbitrary origins to a different domain using its overrideHost command. The author demonstrates how to set up a Cloudflare worker and configure WebPageTest to redirect requests through the worker. They also provide examples of basic workers that can modify HTML responses or change request priorities. The potential performance improvements from these techniques are illustrated with filmstrips and waterfalls, showing the effects of loading pages over a single connection and modifying HTTP/2 prioritization. In summary, combining WebPageTest and Cloudflare Workers offers an efficient solution for testing new performance ideas and understanding their impact on website performance.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Real-time 2 518 126 55 -69%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.