6

I've got a request for a research website which will test user's behavior when doing repetitive tasks on a normal and slow Internet connections.

I'm wondering if there are any JS libraries I could use for bandwidth throttling in the different scenarios of the research and thus to simulate slower connection? I came across tools such as Charles and crapify, but I'm not sure if they can be integrated with a website and I really need it to be configurable client side.

Goran Stoyanov
  • 2,311
  • 1
  • 21
  • 31
  • 2
    Google Chrome (and other browsers) have this functionality built-in. What do you need to use it for? – Cerbrus Sep 05 '17 at 07:56
  • 3
    There is no need to do this _in_ JavaScript, most browsers will allow you to simulate a slower bandwidth. For example [Chrome](https://developers.google.com/web/tools/chrome-devtools/network-performance/network-conditions) and [Firefox](https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode#Network_throttling) – George Sep 05 '17 at 07:56
  • 1
    Yes, I am aware there are ways to do that via developer tools, but I don't want to do it for myself, I need to randomly assign slow/normal connection to users and record their behavior/performance which will be later used as a data source for a research. – Goran Stoyanov Sep 05 '17 at 07:57
  • 2
    That's probably something you'd be better off doing server-side. Note that users will be pretty annoyed if they're just expecting a normal, fast website. What kind of website is this? Can users expect to be tested in some way? – Cerbrus Sep 05 '17 at 08:00
  • @GoranStoyanov ahh right, apologies, I misread the question. I agree with Cerbrus, this is something you'd want done server side. Perhaps have some users connect over a different port and throttle that specific port on the server? – George Sep 05 '17 at 08:01
  • @Cerbrus Yes, they will be aware that they are participating in an experiment. – Goran Stoyanov Sep 05 '17 at 08:08
  • 2
    In that case, Better figure out some way to do it server-side. You could make the client-side JS aware it's being throttled with some kind of parameter, but the actual throttling is more difficult. – Cerbrus Sep 05 '17 at 08:10

1 Answers1

2

It's not necessary to do this in JavaScript since you can do it on your browser by changing the throttling settings. However if what you are looking for, is some type of unit or automated testing, then would I suggest using something like Selenium.

found this link that might prove useful to someone http://elementalselenium.com/tips/64-limit-bandwidth

Shay Ribera
  • 359
  • 4
  • 18