I’ve refined my previous idea slightly:
- IMG tags have src set to “” to start with.
- A new IMG tag exists. It’s src is set to deliver results back to me.
- When the first imge loads, a timer is kicked off.
- When either the last image loads or the timer fires, the results IMG src is set to send some data to the server, including: ipv4 loadtime, ipv6 loadtime, ipv6and4 loadtime. Where images don’t load, NaN is sent.
- When the timer fires, the src of the various IMGs is optionally set to “”, to stop the test.
I think that’s about it.
I’ve been running this for a few days on my websites. At least one of them isn’t small and has a wide range of users from non-technical to pretty-technical, and a wide range of OSes and browsers.
The code has been published at: