Search code examples
performancemobileconnectionmobile-browser

Some way to guess the speed of client connection


I have to do dynamic decision about the contents weight to send to the client based on his/her connection speed.

That is: if the client is using a mobile device with 3G (or slower) connection, I send to him/her a lightweight content. If he/she is using WiFi or faster connection, I send to him/her the complete content.

I tried to measure the time between reloads, sending to the client a header Location: myurl.com (with some info about the client to identify it). This works on desktop browsers and some full mobile browsers (like Obigo), but it doesn't work on mini (proxy) browsers, like Opera Mini or UCWeb. These browsers return the time of connection between my server and the proxy server, not the mobile device.

The same occurs if I try to reload the page with <meta> tag or Javascript document.location.

Is there some way to discover or measure the speed of client connection, or whether he/she is using 3G or WiFi etc., which works on mini browsers (ie, that I can identify a slow connection thru a mini browser)?


Solution

  • I think you should not measure the speed or throughput.

    A first guess could be the browser of the client. There are many different browsers for computers but they are generally not the same as browsers for mobile devices.

    It is easy to check what browser your users are using.

    Still you should provide an option to switch between light weight and full content because your guesses could be wrong.