JavaScript is cool again?

Ever since JavaScript was conceived, there’s always been a stigma attached to using it. The arguments which are thrown around include saying that most people have it turned off, it doesn’t work consistently across browsers, and there are evil security bugs. But if this is the case, why would Google, arguably one of the webs best known companies, be using it at the core of two of its services - GMail and Google Suggest (beta)?

Well, there are a few reasons. PassiveDigressive makes the points of immediacy and bandwidth conservation - simply, you want new information right now, without a round trip to the server, and if you do have to make a trip to the server you only want to grab the new information. What you don’t want to have to do is grab an entire page full of menu bars, backgrounds and the like every time you change some information in a form.

This is exactly what Google Suggest does. Each time you type a new character, a tiny remote procedure call (RPC) is sent to the google servers using JavaScript, the results of which are dynamically integrated into the page that the user is already on. The first time I saw this happening last week, I did like out a little cry of “wow”. The whole process is utterly transparent to the end user, and it’s just so fast! Admittedly, I am connected to the internet via a very fast university connection, but the “ooh”s and “ahhh”s that I’m hearing from people using much slower connections suggests that it’s pretty darned fast for them too. Chris Justus has written an excellent blog entry which dissects Google Suggest, and gives a much clearer idea of how it works.

It looks like JavaScript is gaining in popularity again for high quality web applications. If people like Google are going to demand that you have it running in order to use things like GMail, then its possible that more people will start to have it turned on again. While I’m personally not likely to be integrating lots of JavaScript into, I look forward to more people doing the sort of speedy, cross-browser, client side coding that Google is writing now.

permalink | View blog reactions

other relevant pages

about wwm is a resource for web developers created by Neil Crosby, a web developer who lives and works in London, England. More about the site.

Neil Crosby now blogs at The Code Train and also runs, The Ten Word Review and Everything is Rubbish.