0

In web development, is it possible to perform a test on bandwidth/internet connection speed in client device, and based on this test, filter items to be displayed.

For instance, is it possible do avoid showing social media buttons if connection speed is low for the user?

I am using PHP for server, HTML/jquery for client side.

Kara
  • 6,115
  • 16
  • 50
  • 57
Adib Aroui
  • 4,981
  • 5
  • 42
  • 94

2 Answers2

1

You'll have to use javascript to download files of varying sizes and time how long it takes. Then based on how long it takes you can handle things differently. Take a look here: Bandwidth utility using javascript

Community
  • 1
  • 1
chrislondon
  • 12,487
  • 5
  • 26
  • 65
1

There is no easy way to do this. There are no built in functions or anything. Using a combination of PHP and JS there are workarounds, but honestly if your user has a slow connection it will slow it down even more to have all that extra javascript to download. You're really better off just making your website as compact as possible. Use style sheets and avoid adding excessive images, etc.

I wrestled a bear once.
  • 22,983
  • 19
  • 69
  • 116