2

For a game we're working on we are currently looking to segment our users into "can download loads of data quickly" and "is on a slow connection" so we can ship different types of assets (e.g. fewer animations, smaller images, etc). To do so we have to make a decision very quickly, so "download an image and measure time" won't work that well.

So far I've only found https://www.maxmind.com/en/geoip2-connection-type-database which would allow me a rough segmentation by connection type, but I was hoping to avoid setting up a backend infrastructure. Does anyone know of any other service or method to detect the type or speed of an http connection? We're not looking for 100% accuracy, just a rough indication.

Thanks!

Edit: Solutions in How to detect internet speed in Javascript? are using downloads of a known payload to detect internet speed. We were hoping to avoid those (to not block our actual download) and use passive (IP or browser feature based) means instead.

Community
  • 1
  • 1
marekventur
  • 1,875
  • 1
  • 16
  • 22
  • You would need flash/java for this IMO. – Gogol Apr 15 '16 at 13:38
  • @guest420420: how would flash/java help? – marekventur Apr 15 '16 at 13:39
  • Instead of autodetecting, wouldn't it make more sense to ask the user whether they're on fast or slow connection? It's virtually impossible to make a remotely accurate estimation because internet connection is a wild, unstable beast. It's probably better to let the user choose whether they will receive lots of assets and then wait for them to load or whether they will choose lo-fi version of the game. – Mjh Apr 15 '16 at 13:41
  • 1
    Never did this actually, but if you check the speedtester websites, they use flash to check the connection reliably.. Also got a HTML5 alternative, might help: http://speedof.me/ – Gogol Apr 15 '16 at 13:41
  • 2
    I assume the players have a login (otherwise take the IP), but you could go with the image-download-trick and measure time only once a while and save that in a cookie or something backend. – Master DJon Apr 15 '16 at 13:42
  • 2
    Possible duplicate of [How to detect internet speed in Javascript?](http://stackoverflow.com/questions/5529718/how-to-detect-internet-speed-in-javascript) – Gogol Apr 15 '16 at 13:43
  • @Mjh that's one option, yes. We're tying to find out whether there's some way without having to ask for user input, especially since most users won't know how to answer it correctly. – marekventur Apr 15 '16 at 13:44
  • @guest420420 All the answers in http://stackoverflow.com/questions/5529718/how-to-detect-internet-speed-in-javascript are using downloads of some payload to detect speed. I'm more after some sort of IP based or otherwise passive method. – marekventur Apr 15 '16 at 13:46
  • @Master DJon Yes, that would be our fallback. I'll also keep the cookie idea at the back of my head. – marekventur Apr 15 '16 at 13:47
  • @advncd: speedof.me works by downloading a known payload to the client and it's a rather large one. – marekventur Apr 18 '16 at 11:10

0 Answers0