Entries in the 'technical' category:

Things for geeks

April 14th, 2005
Posted by gerrod in: technical

XMLHttpRequest vs ActiveXObject: Microsoft actually invented the XMLHttpRequest, and yet it seems they handle it the worst out of all the browsers. For a start, you have to custom build your javascript to check for their browser. Then, you have to be able to support older browser versions!

function GetXmlHttpRequestObject() {
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        return new XMLHttpRequest();

    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        var xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");
        if (!xmlHttpObj) {
            xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");
        }

        return xmlHttpObj;
    }
}

So thankfully it all works from here. But I found out yesterday that once an Internet Explorer window has sent the request, it will never re-send it to the same URL. Instead, it’s logic effectively says, “hey, I’ve already checked that for you, so I’ll save you sending it again – here’s the results!”. Rather annoying when you’re sending different values in the header, and hence you’re expecting different results. Grrr…. So I had to use the old “append a random number at the end of the URL to force the browser to think it’s a different URL” trick – worked a charm.

Needless to say, the whole thing worked first go in Firefox

Jetbrains: Best news for ages – the good folk at Jetbrains are working on an IDE for .NET V2. You can head to the site and check out a very early (and raw) preview of the unnamed IDE. (You can also suggest names to them for consideration!). The screenshot doesn’t give you much to go on, except the promise that it’s coming! I can’t wait to sign up to the early access program!

2 Comments

Get Skype!

June 22nd, 2004
Posted by gerrod in: technical, websites

Yesterday I tried using Skype to talk to the boss over the internet. It was super impressive! You can do the same thing through MSN Messenger, but the quality is much superior in Skype. Also, Skype lets you have conference calls – and it’s totally free. Nice!

It’s still in beta, but it’s highly worth downloading. There’s even a version that will run on Linux, and one for Pocket PC, too! My Skype username is superfunmrhappyguy – go and download it, and add me into your contacts list!

No Comments