Q:

Testing Internet connectivity problems such as hangs and timeouts with Javascript

I have a web app that I provide to small to medium-sized businesses as a service. Most of the support calls I get concerning speed issues end up being caused by problems on my clients' networks. 
I would like to be able to point them to a specific web page that will run an x-minute test where multiple HTTP requests would be made via JavaScript every y seconds, which would then report back any problems such as longer-than-usual responses (>5 seconds) and timeouts. In theory this would mimic normal web app usage without taking into account things like database hits and would help reproduce intermittent hangs.
My question is two-fold:

Is this an effective way to test simple HTTP connectivity (beyond ping/tracert) to determine if the slowness a client is experiencing is HTTP related?
Does anyone know of any examples of this type of thing?

I'm not necessarily looking for code; I'm curious whether this is a viable solution to helping me more quickly diagnose my clients' connectivity issues.
Thanks.

A:

You can make periodic calls with xmlhttprequest and you can accurately obtain some network diagnostics.  For instance,  you can determine how fast files are transferring by seeing how long it takes to download them.   You can also make periodic tests and count the failure to determine packet loss.   However a tool like fping is much much better at identifying packet loss.   The "Same Origin Policy" for javascipr puts a serious limitation on what you can do.  Having a client side application written in C++ or even Java (maybe an applet?) would be more accurate and could provide a wider verity of tests (like the tests that fping is capable of).

