11

For web development purposes, I want to be able to throttle the bandwidth Chrome uses, especially for localhost connections.

I know that the add-on "Firefox Throttle" does that in Firefox; is there a way to do the same thing in Chrome, with the web development tools or an extension?

4 Answers 4

9

Under Mac OS X you can use ipfw.

sudo ipfw pipe 1 config bw 15KByte/s
sudo ipfw add 1 pipe 1 src-port 80
# delete the port
sudo ipfw delete 1

My Source: http://hints.macworld.com/article.php?story=20080119112509736

1
  • This worked like a charm! Feb 29, 2012 at 9:09
2

You can't 'throttle' localhost (127.0.0.1) connections. That's just never going to happen. Since what you need is to test a web application in a pre-production environment, you have to find some sort of network environment emulator/simulator.

One of the companies I once worked for used Shunra vCat exactly for such testing purposes, among others. You might find a free alternative or two if you'd look around, but I'm not sure.

1
  • I used to use firefox throttle, and it does throttle localhost connections. If you don't trust me, install an old version of firefox with the "firefox throttle" extension. screenshot Jul 29, 2011 at 8:01
2

If you hit Ctrl+Shift+I, the Developer Tools for Chrome come up.

Go to the "Network" subtab that opens in that pane, and in the sub-subtab that opens up in that pane, click on the "No throttling ▼" ("▼" looks like a down-arrow).

There, you'll be able to choose a certain kind of bandwidth limitation from a list of available types, as if you were using only that kind of connection (2G, etc). I'm not sure whether it only counts for downloads instead of uploads, which is what I'm looking for, but I did find that.

1

Apple has made a very handy official tool to slow down the network on the mac for testing.

It's called the Network Link Conditioner and it's a free download of Xcode for Lion users. Most older versions of Xcode before version 4.3.2 embedded a copy of this tool. Now, you use Xcode to download it directly in a similar manner to the iOS simulators and developer documentation.

enter image description here

There are 11 built in profiles from a Lossy Edge network with 400ms delay to a cable modem. If you need other limits, you can also use ipfw yourself as described in Craig Hockenberry's article slow ride, make it easy It also mentions the Speed Limit panel by Mike Schrag that is a smaller download than Xcode, but has fewer options than Apple's tool.

It slows down the entire network stack, so you can't throttle on a per app basis without doing things like install lion in a virtual machine and set that VM with a throttled stack.

Source: https://apple.stackexchange.com/questions/24066/how-to-simulate-slow-internet-connections-on-the-mac

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .