ColdFusion, WordPress, Flash & other web things


Simulating slow connections for Flash apps

I’ve always wanted to be able to simulate a slow connection on my local dev machine to test Flash apps that load external media and data files. Tonight, I finally spent some time looking for a solution and found this great Apache module: mod_bandwidth. This module is the perfect solution to my problem.

The following settings are ideal for testing Flash loaders for external images.

LoadModule bw_module modules/bw_mod-2.0.53.dll

BandWidthModule	On
BandWidth	all 25600
BandWidthPacket	1024

Note: The above settings are for a Windows machine and the module is for Apache 2.

Update

Turns out this is a much better solution. See Richard Leggett’s comment.

5 comments

  1. #1: Richard Leggett Says:

    Charles is also a good bandwidth throttler (for visiting internal and external sites), and will force no-caching of SWFs:
    http://www.xk72.com/charles/throttle.html

    Alternatively just sign up for NTL broadband and you can be sure to get 32kbps you’re looking for.

  2. #2: RL Says:

    Just noticed your in Leeds too :)

  3. #3: Martin Says:

    Richard: Thanks for the tip!. I’ve just tested Charles and it definitely beats my Apache module. The problem with mod_bandwidth is that it doesn’t provide a continuous stream of data; the mininum packet size is 1k so the data loads in big chunks and you don’t get nice smooth loading animations. Charles handles this perfectly.

  4. #4: Erki Esken Says:

    If you use CF/JRun, then there’s a utility called sniffer.exe in jrun4\bin. It’s actually the TCPMonitor application from Apache Axis webservices toolkit.

    You can set up a traffic throttling http proxy with it. Just run sniffer.exe, set the listening port, select Proxy and Simulate Slow Connection. Now configure you browser’s proxy settings to use localhost:chosenport.

    Try using different delay and pause settings to get different speeds.

  5. #5: Josh Says:

    There is also Sloppy, which doesn’t do as much as Charles, but will throttle your connection without nag screens.

    http://www.dallaway.com/sloppy/

    Charles looks pretty awesome though.

Leave a comment