Embedding a speed test on a website
A speed test on your own page saves visitors a trip elsewhere, which suits a provider’s support section or a help article. It also adds a dependency to the page: an iframe or JavaScript, extra network requests, caching and logging by a third party. Before publishing, evaluate an embedded speed test or IP widget for HTTPS/CSP compatibility, performance budget, availability and the technical data the third party can see.
Do not start the test for the visitor
A speed test can generate substantial traffic, so do not auto-start it unexpectedly on metered connections. Explain that the test transfers data and let the visitor press the button. Reserve layout space for the widget in advance so that the page does not jump when it loads.
What to test before publishing
Use HTTPS, because a secure page will not load an insecure frame. If your site sends a Content Security Policy, it must allow the widget’s source. Test the responsive layout and the loading behaviour. Then test with third-party requests blocked, as many visitors’ browsers do, and verify that a failure of the third party does not break navigation or the surrounding page.
What the widget’s provider can see
Every visitor’s browser contacts the third-party server directly. For an IP widget, remember that a public IP is network metadata and can appear in server logs. Mention the widget in your privacy notice, and do not pass secrets or personal data in query strings.
To see the corresponding 2ip widget in practice, open the 2ip speed-test widget.