A Web Page Designed To Take 30 Seconds To Load

Today, while working on a bug where an Android app was blocking the UI while waiting for a slow-loading URL, I needed a test URL that would take at least 30 seconds to load. So I created one, here, which I figured others might find useful for testing.

Here's the PHP:


Note: You can achieve almost the same thing using the Charles proxy's throttling feature. Open Proxy -> Throttle Settings..., check the "Only for selected hosts" box, and enter the host for which you want a delay. Then, in the settings section, set "Round-trip latency" to the number of milliseconds you'd like to delay. This doesn't allow you to specify full path, but sometimes delaying an entire host is enough, and this is certainly easier to set up.

comments powered by Disqus