Posts Tagged ‘Javascript’

Extending Prototype’s Template class to allow default values

September 14th, 2011

I’ve often wanted to extend Prototype’s Template class to allow setting default values for template fields if the user doesn’t pass them, so I wrote a simple wrapper class that does just that.

» Read more: Extending Prototype’s Template class to allow default values

Hosting ga.js locally (google analytics tracking code)

June 22nd, 2010

Hosting ga.js locally has two main benefits – fewer DNS lookups for the client’s browser (you could even combine it with your site’s java script to reduce HTTP reqs as well), and you might be able to get it to your users faster than Google can. Whilst the second point isn’t likely true for many, it is true for those of us serving most of our content in Australia.

Google recommends you don’t do this, but doesn’t say you can’t.
» Read more: Hosting ga.js locally (google analytics tracking code)