Skip to content

Posts tagged ‘javascript’

21
Nov

Testing Web Performance by Throttling Bandwidth

In the past, I often found myself wondering how some of my websites would perform when accessed from a low bandwidth connection. Unfortunately, I had no convenient way to test such a scenario, so I usually just forgot about the idea. I recently found myself in a similar scenario at work, and my searches returned a useful tool, Speed Simulator, by Vikas Patial:

Speed simulator is a simple throttling proxy which allows you to see how your site behaves under different connection speeds. It was written by me to test AJAX/Flash loaders and see how much my time took to load.You can simulate various speeds like that of a modem or a ADSL.A pre delay function is also there to help simulate delays due to DNS , connection establishment etc.

Here’s what it looks like:

Screenshot of the Speed Simulator user interface

It simply acts as a proxy, so all you need to do is point your browsers to access the web through Speed Simulator. You’ll then be transported back to the good ol’ days where most people had to wait for websites to load.

To do this:

  1. Click Start, and search for “Internet Options”. Launch it.
  2. Click on the “Connections” tab.
  3. Click the “LAN Settings” button, found within the “Local Area Network (LAN) Settings” section.
  4. Once the “Local Area Network (LAN) Settings” dialog appears, locate the “Proxy Server” section.
  5. Enable the “Use a proxy server for your LAN” checkbox, and enter the following:
  • Address: localhost
  • Port: 8080 (reflect the port listed in Speed Simulator)

Local Area Network (LAN) Settings dialog in Windows, with a proxy server configured.

Press OK to save your changes, and then simply click “Start” in the Speed Simulator window.

That’s it – all you need to do next is launch a browser, the bandwidth should be throttled. I’ve seen it work with Google Chrome and Internet Explorer. Configuring a proxy in Firefox requires different steps, but should work just as well, once configured.

I can see myself using this tool in the future, and not only for simple performance tests. For example, I can use it to test for possible timing-related flaws in JavaScript code. Definitely a welcome addition to my web development tool set.

Gravatar Photo Reviewed by
Brian Ricard

Sponsors
DiggRedditStumbleUponSlashdotShare
23
Jan

Copying the Contents of Windows Dialogs

As a developer, I very often see error messages – some of those originate from the products I develop, and I have to report them as bugs. Whenever I get an error message in a dialog, I typically take a screenshot, and add that to the bug base issue. That’s fine, but it means people can’t search for that error message in the bug base – in order to enable that, I’d usually just manually type out the error message, rather than take a screenshot. That was before. Today, I’d just press CTRL+C to copy the error dialog contents.

That’s right, whenever you see a dialog in Windows, like this:

A typical Windows error message dialog.

You can press CTRL+C to copy, and then open up Notepad, and press CTRL+V to paste:

The dialog title, contents, and even the button text are saved to the clipboard.

I had no idea this was possible until I read a Lifehacker article explaining it.  Since I’ve started using it, I’ve found it very useful in my every day work. Maybe you will too!

Just a note, though – it doesn’t seem to work everywhere. For example, JavaScript alert dialogs can’t be copied in Firefox, but they can in Internet Explorer.

Sponsors
DiggRedditStumbleUponSlashdotShare