Monday, May 17, 2010

JavaScript Ping

After doing mountains of research and testing on the subject, I've come to the unfortunate conclusion that a Client-Side JavaScript Ping program is impossible to do.

I thought that maybe I'd be able to monkey around in some clever way of using page-loads and time measuring, but it doesn't work. Unfortunately the event handler for onLoad doesn't work exactly how you would expect thus the getTime() function doesn't actually time the page load.

I thought I could work around this by opening new windows, and time it with the window.onLoad event, but this didn't work out either.

Curse you JavaScript! This is something that would be very beneficial for better web software! I suppose I may be able to implement this in VBScript instead. There will be news if I have any success.

Sunday, May 2, 2010

DNS Issue

I recently solved a problem with my ISP's DNS lookup. Google Chrome was waiting forever on loading pages that weren't already DNS cached. I could tell this because they spent a long time on the "Resolving Host" phase, then they would report back with "Page Unavailable".

Further diagnosis included using cmd tools. I used `nslookup` in order to force responses from my local ISP's DNS. While the responses didn't usually take more than a few seconds, there was definitely a problem somewhere. I then changed my DNS in windows to use the Google Public DNS. This seems to have solved my issue.

While I'm aware that DNS lookup on the Google servers would probably take slightly longer than my ISP's, Google doesn't have the problem of timing out on ever uncached request. I've been using Google Public DNS for 4 days now, and everything is just awesome.

Google Public DNS Servers are: