Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to simulate slow connection with Javascript?

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.

like image 330
Goran Stoyanov Avatar asked Nov 08 '22 17:11

Goran Stoyanov


1 Answers

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

like image 75
Shay Ribera Avatar answered Nov 14 '22 22:11

Shay Ribera