Is there a Firefox add-on available that will simulate various connection speeds (especially when testing from http://localhost)?
I know there are standalone applications to do it, but I'd rather have a plugin.
Edit: Thanks to @UselessAdmin - FirefoxThrottle has now been updated to work on localhost!
Firefox Throttle  Now works on localhost
"Firefox Throttle is a small plug-in for your favorite Web Browser, that allows you to cap download/upload rates and monitor current bandwidth utilization. "
Internet Explorer Throttle  (As of 2010/02/23, still doesn't work for localhost)
"IE Throttle is a small plug-in for your Microsoft Internet Explorer, that allows you to cap download/upload rates."
On every modern Linux system you will find the tool "tc" (traffic control).
For several *NIX distros there are packages called ' iprelay '.
For example Debian you could do the following:
$ iprelay -b2500 8000:localhost:80 # Point browser at http://localhost:8000
and you can see your website creations as a poor modem user would...
or a link for an Ubuntu package: http://manpages.ubuntu.com/manpages/gutsy/en/man1/iprelay.1.html
The original iprelay Perl script found at Gavin Stewards website  works on OS X out of the box.
Another tool which works on Windows: Internet Speed Simulator  http://tldp.org/HOWTO/Traffic-Control-HOWTO/index.html
The "Charles Web Debugging Proxy" has no problem throttling localhost. It works on windows, mac and linux. The trial version is fully functional and a licence costs only $50. I highly recommend it.
Fiddler can similulate slow modem connections:
Here's how to modify the delays  in the request and response.
Here's how to use Fiddler with Localhost . http://groups.msn.com/HTTPFiddler/featurerequests.msnw?action=get_message&mview=0&ID_Message=687
Install FirefoxThrottle. This will display the speed in the Firefox status bar.
Now in Firefox go to the address you want to throttle and get the EXACT URL.
Example: I'm in Canada so if I type "google.com" in the FireFox URL it actually takes me to http://www.google.ca/
Start Sloppy (it is a Java webstart) so just double click the sloppy.jnlp file
Now paste the URL into sloppy (i.e. Paste the entire "http://www.google.ca/" string).
Firefox will take you to http://127.0.0.1:7569/ which is a throttled version of the site.
Firefox Throttle will display in the Firefox status bar the speeds you are getting.
Due to overwhelming popular demand Firefox Throttle has been updated, it can now throttle localhost connections.
I think you would be better off by using a purpose built proxy as it would work in all browsers and/or any other applications. So I think you should have a look at Sloppy .
Basically, all you need to do is launch Sloppy, enter the address of your site and then it will open it in your default browser and simulate a dial-up speed. As a plus side, it's written in Java so it would work on Mac or Linux as well. http://www.dallaway.com/sloppy/
Use NetLimiter  to limit your internet bandwidth upload/download per program.
Simply checkmark the Incoming/Outgoing limit checkbox next to Firefox, type in a speed limit in the current units (Kbits/KB per sec/kbits per sec).
Firefox's connection speed is limited to your setting so you can simulate slow download speeds, etc! http://www.netlimiter.com/
Adding to DrJokepu's  answer, set up Sloppy  (or a similar proxy) then use the FoxyProxy  plugin for firefox, which supports sending particular addresses through particular proxies, as well as easy toggling if you don't want to use them at all. http://stackoverflow.com/users/8954/drjokepu
Here's an easy and configurable non-proxy solution for Mac users that works across browsers. It installs as a preference pane.
Run a proxy server, config firefox to use the proxy server, and control the bandwidth on the proxy server.
There could be a way to trick the plugins mentioned in @Jonathan Sampson's answer  to do throttling also for your local server.
If you have a high-speed connection and you're behind a modem/router that you are willing to configure (one time set up):
Assuming your external IP doesn't chance all the time (especially if you're in an office with a dedicated line), this solution will help you to use those plugins, with a one-time or one-in-a-while setup in your modem/router. http://stackoverflow.com/questions/473465/firefox-plugin-to-simulate-slow-internet-connection#473489