Archiv der Kategorie: Webdevelopment

Simulate slow connection with the Bandwith Module for Apache

For testing websites that are intended for use in the fields, I often wanted to make your http://localhost feel like on a modem connection. The easiest solution I found is the the Apache module mod_bw.

This is a short setup guide for Ubuntu Webdevelopers that care about their users or everybody who want’s to get an idea about how Internet in large parts of the world feels 🙂

Setup on Ubuntu

  1. Install the module using for example using aptitude install libapache2-mod-bw
  2. Activate the module: a2enmod bw
  3. Insert the following configuration to your virtual host:
    BandWidthModule On
    ForceBandWidthModule On
    BandWidth all 1024
  4. Restart Apache
  5. If not done already, you might should also install also the Webdeveloper plugin for
    Firefox and choose Web Developer -> Disable -> Disable Cache

Now browsing on http://localhost will be at 1kbyte per second.

Optimize your Website

  • Using mod_gzip to compress data
  • Minify CSS, Javascript and optimize Pictures

Additional tipps can be found in Yahoo’s Best Practices for Speeding Up Your Web Site.