Archive for the 'code' Category

Firefox 1.5, XmlHttpRequest, req.responseXML and document.domain

July 27th, 2006 by Alexander Kirk | Comments 3 Comments »

Recently I have been working on a web application, extending it with an iframe on another subdomain. When you set up communication with an iframe on another subdomain, it works by setting document.domain in both pages. Pretty nice and straight forward. But it can mess up the rest of your page. As soon as you [...]

Misuse of the Array Object in JavaScript

May 18th, 2006 by Alexander Kirk | Comments 4 Comments »

There is a very good post about Associative Arrays considered harmful by Andrew Dupont. The title is a bit misleading but correct. When coming accross a piece of JavaScript like this foo["test"] = 1; there is nothing wrong about it. It's the basic usage scheme of assoziative arrays. Or should i rather say objects? While [...]

Welcome naked!

April 5th, 2006 by Alexander Kirk | Comments Comments Off

Today is CSS Naked Day. Take this chance to visit my site in person (= with your browser). Looking quite okay naked, too ;) css naked day, css

A better understanding of JavaScript

March 2nd, 2006 by Alexander Kirk | Comments 3 Comments »

I've been working with JavaScript for years. It was my replacement for a server side language when I couldn't afford to buy web space in the mid-90's. Still, as the language becomes popular again, I recognized that I did understand the basics but there was much more to the language. digg it, add to delicious [...]

10 Realistic Steps to a Faster Web Site

February 2nd, 2006 by Alexander Kirk | Comments 56 Comments »

I complained before about bad guides to improve the performance of your website. digg it, add to delicious I'd like to give you a more realistic guide on how to achieve the goal. I have written my master thesis in computer sciences on this topic and will refer to it throughout the guide. 1. Determine [...]

Speed up your page, but how?

January 3rd, 2006 by Alexander Kirk | Comments 2 Comments »

Today I ran accross the blog entry by Marcelo Calbucci, called "Web Developers: Speed up your pages!". It's a typical example of good idea, bad execution. Most of the points he mentions are really bad practice. He suggests reducing traffic (and therefore loading time) by removing whitespace from the source code, to write all code [...]

Using a Feedback Form for Spam

November 11th, 2005 by Alexander Kirk | Comments 3 Comments »

Have you ever received weird spam via the feedback form of your site? Something with your own address as sender or with some Mime stuff in the body? Your form is likely to be misused for spamming. How does it work? For PHP, for example, there is the mail function that can be used to [...]

Eclipse Everywhere. Buah.

October 19th, 2005 by Alexander Kirk | Comments 11 Comments »

It's been a little quiet lately. This is because I am working on a cute little project that I will be able to present soon. More when the time is ready. There has been rumor lately that Zend (developer of PHP) will release a PHP Framework. This is nothing new, there has been a IDE [...]

Caching of Downloaded Code: Testing Results

October 11th, 2005 by Alexander Kirk | Comments 7 Comments »

Today I did some experimenting with the caching of downloaded code (or On-Demand Javascript, whatever you want to call it). I've set up a small testing suite that currently tests 3 different ways of downloading code: script-tag insertion via DOM, XmlHttpRequest as a GET and XHR as a POST. These are my results for now: [...]

Better code downloading with AJAX

October 10th, 2005 by Alexander Kirk | Comments 3 Comments »

I've been playing with Code downloading (or Javascript on Demand) a little more. Michael Mahemoff pointed me at his great Ajaxpatterns in which he suggests a different solution: if (self.uploadMessages) { // Already exists return; } var head = document.getElementsByTagName("head")[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "upload.js"; head.appendChild(script); Via DOM manipulation a [...]

No Google Office To Be Expected

October 9th, 2005 by Alexander Kirk | Comments Comments Off

According to an interview of Sergey Brin (founder of Google) by John Battelle, Google does not plan to publish a web based office, as rumored before (fueled by a new partnership between Google and Sun (owner of openoffice.org)). "I don't really think that the thing is to take a previous generation of technology and port [...]

Code downloading with AJAX

October 5th, 2005 by Alexander Kirk | Comments 4 Comments »

Earlier, I suggested to use Code Downloading in order to reduce the size of AJAX application. I left the term undescribed, but I will change this now: As JavaScript is an interpreted language, it is quite easy to load additional code, even after the application has "started". This means that only code absolutely necessary to [...]