is there anyway to throttle connection speed (band

2019-04-20 15:19发布

I was wondering it there was a way to throttle inbound connection speed using some extension / addon for any modern browser?

I would like to slow the speed down to something like 20kbs just to see how things load, as well for other testing.

Does anyone know to accomplish this using any of the modern browsers?

8条回答
我只想做你的唯一
2楼-- · 2019-04-20 15:42

Another alternative is Charles Proxy - it lets you simulate slow network connections. This approach is browser independent, just alter the browsers network configuration to use Charles as its web proxy.

查看更多
做自己的国王
3楼-- · 2019-04-20 15:42

As of late 2014, chrome now has this built directly into the developer tools.

https://developer.chrome.com/devtools/docs/device-mode#network-conditions

查看更多
趁早两清
4楼-- · 2019-04-20 15:45

For Firefox, you could use FirefoxThrottle. If you need to test different browsers, I'd go for a throttling proxy instead.

查看更多
神经病院院长
5楼-- · 2019-04-20 15:54

You can do an online test with http://www.webpagetest.org under test settings / connection

查看更多
Animai°情兽
6楼-- · 2019-04-20 16:01

You could configure your browser to use a tunneling proxy that limits the speed. For example, running in Node.js the following server

//Node.js 5.12.0
var net = require('net'),
    tg = new (require('stream-throttle').ThrottleGroup)({rate: 20*1024});
net.createServer((s) => {
    var d = net.connect({ port: *, host: '**' });
    s.on('error', () => {}).once('close', () => d.end());
    d.on('error', () => {}).once('close', () => s.end());
    s.pipe(d).pipe(tg.throttle()).pipe(s);
}).on('error', (err) => {throw err}).listen(8124);

,where * and ** are the port and the ip address, respectively, of a proxy server, and configuring your browser to connect to 127.0.0.1, port 8124, reduces the speed to 20 KB/s. The proxy can be any remote or local proxy server (e.g., Squid, Privoxy or one from npm) that supports the same protocol as the browser.

查看更多
劫难
7楼-- · 2019-04-20 16:05

Finally Firefox also added Network Throttling control in their Responsive Design Mode in DevTools. Available in v.52.x https://developer.mozilla.org/en-US/docs/Tools/Responsive_Design_Mode#Network_throttling

查看更多
登录 后发表回答