How to test a site for low bandwidth?

2019-02-09 14:58发布

问题:

I'm developing a web application for mobile browsers. Right now most of development is done on local machines (with local apache) and I'd like to test how it behaves in low bandwidth and even high latency environments. I don't need to use apache as there is little server side things for the moment. Do you know any good tool?

回答1:

You may want to give Sloppy a try.

UPDATE: @SamSaffron posted a cool gist: https://gist.github.com/2132065 to inject 300ms latency into the network stack

#!/bin/sh
ipfw -q -f flush

ipfw add pipe 1 in
ipfw add pipe 2 out
ipfw pipe 1 config bw 512Kbit/s queue 30 delay 150ms
ipfw pipe 2 config bw 2Mbit/s queue 10 delay 150ms
ipfw -q add allow all from any to any


回答2:

I usually just install Fiddler on the client and run the site whilst running Fiddler. It can simulate 56K speeds and it can also keep track of how much data has been received so you can check exactly how much bandwidth your site uses.



回答3:

Try this addon for Fiddler2 to limit the bandwitdth

http://www.logic-worx.com/index.php/tools-and-apps/fiddler-connection-simulator/



回答4:

If you're using Firefox, you could install Firebug and install Yahoo!'s YSlow addon. This adds an additional tab to Firebug which points out bandwidth bottlenecks for the currently loaded page.



回答5:

There is a great tool for this purpose Charles

About Charles

Charles is a web proxy (HTTP Proxy/HTTP Monitor) that runs on your own computer. Your web browser (or any other Internet application) is then configured to access the Internet through Charles, and Charles is then able to record and display for you all of the data that is sent and received.

In Web and Internet development you are unable to see what is being sent and received between your web browser / client and the server. Without this visibility it is difficult and time-consuming to determine exactly where the fault is. Charles makes it easy to see what is happening, so you can quickly diagnose and fix problems.

Charles makes debugging quick, reliable and advanced; saving you time and frustration!

Key Features

  • SSL Proxying – view SSL requests and responses in plain text
  • Bandwidth Throttling to simulate slower Internet connections including latency
  • AJAX debugging – view XML and JSON requests and responses as a tree or as text
  • AMF – view the contents of Flash Remoting / Flex Remoting messages as a tree
  • Repeat requests to test back-end changes
  • Edit requests to test different inputs
  • Breakpoints to intercept and edit requests or responses
  • Validate recorded HTML, CSS and RSS/atom responses using the W3C validator

All above content is taken from CHARLES Website.