Google Image Search

Google Image Search

Image by schoschie
While working on something related, I un-minified and cleaned up the source code of an example Google image search, and man, that is some ugly shit. Obviously, it works, but it’s really ugly.

The HTML is HTML 4 with markup errors and font tags, and the actual search results are built up completely using heavily* somewhat obfuscated JavaScript. I did that kind of stuff in 1999 and 2000, and it was bad!

Since Google usually know what they are doing, there must be a reason for this, and I’m not quite sure what it is. Or maybe they wrote it in 2000 and someone said »if it ain’t broke, don’t fix it«, and it stuck until today.

(* I recently took another look at some of the IOCCC entries which gave me a reality check as to the extremes of obfuscation –

Update 20090615: After having studied some more Google web page sources and reading the other article, the reason is performance and efficiency. Google doesn’t care much about standards as long as the content is accessible in any browser, and every byte they can save counts. To them, 10 more bytes in a search result probably means 1,000 new servers.

2 thoughts on “Google Image Search

  1. Does not compute!

    With Google Web Toolkit (GWT), you write your AJAX front-end in the Java programming language which GWT then cross-compiles into optimized JavaScript that automatically works across all major browsers. During development, you can iterate quickly in the same "edit – refesh – view" cycle you’re accustomed to with JavaScript, with the added benefit of being able to debug and step through your Java code line by line. When you’re ready to deploy, GWT compiles your Java source code into optimized, standalone JavaScript files. Easily build one widget for an existing web page or an entire application using Google Web Toolkit.

    There is no AJAX involved. There are no external JavaScript files. (Actually, there are no external files at all except for the images. Even the CSS is all included in the main page.)

Leave a Reply