Topic: ajax

How Google Analytics determines Connection Speeds

Today I was looking for an unobtrusive method of determining a user’s connection speed using JavaScript. A quick search on Google returned an array of tricks mostly having to do with using Ajax to make a call behind the scenes, and track the payload time for the small file. In most cases people use an image with a random variable at the end to avoid caching, like image.jpg?foo=1Rt2X21. This is all good but adds an HTTP connection which could potentially interfere with the user’s experience, especially if they are already on a slow connection to begin with. Continue »

Sniff and Disable Firebug Howto (Gmail example)

Here is a simple test to see if users have Firebug installed on their browsers. Obviously this would also weed out non-FireFox users.

if (window.console && window.console.firebug) {
  alert("found Firebug");
  alert("can't find Firebug");

Continue »

Advanced Blog Stats From Clicky

I’ve been using Clicky from Performancing Inc. for the past few weeks now and I had to write this review to let everyone know about this amazingly powerful, unique and advanced statistical package that you should be using on your blog. Personally I have used many other statistics packages including Google Analytics, and many other stats packages for WordPress, but none of them have been as valuable as Clicky, and I find myself going back to it over and over again.

Continue »

Simple AJAX Request and Response JavaScript

Here is the simple form of an AJAX call made to an XML document, parsing through the returned document and and grabbing the a specific node from the DOM. There is a try/catch clause to handle the 4 different sets of XMLHTTP objects for different browsers. The callback function is called once the response is returned as 4+200 and the response is rendered to the user. Below is the JavasScript code snippet. Continue »