How to simulate limited bandwidth in Google Chrome and Firefox

Updated . Posted . Visible to the public. Repeats.

Your development machine is usually on a very good network connection.
To test how your application behaves on a slow network (e.g. mobile), you can simulate limited bandwidth.

Chrome

  • Open the dev tools (Ctrl+Shift+I or F12) and switch to the "Network" tab
  • In the row below the dev tool tabs, there's a throttling dropdown which reads "Online" by default.
  • Inside the dropdown, you will find a few presets and an option to add your own download/upload/latency settings.

Firefox

  • Open the dev tools (Ctrl+Shift+I or F12) and switch to the "Network" tab
  • On the right of the row right below the dev tool tabs you will find an option which reads "No throtteling" by default.
  • Pick one of the presets available there.

(Almost) any application: trickle

There is a Linux utility called "trickle" that allows you to do limit the bandwidth available to a process.

You may need to install it first. For example, on Ubuntu:

sudo apt-get install trickle

To start an application with limited downstream or upstream, run it through trickle. Example:

trickle -d 50 -u 20 firefox

This will start a Firefox process which is limited to 50 kB/s download and 20 kB/s upload.

Note that this will not work on some applications (e.g. Chrome).

Simulating limited CPU power

Note that mobile devices often also have limited CPU resources. We have a separate card about that.

Tobias Kraze
Last edit
Arne Hartherz
Keywords
throttle
License
Source code in this card is licensed under the MIT License.
Posted by Tobias Kraze to makandra dev (2014-03-21 10:40)