The blog contains tips for drupal development using the Drupal content management system/framework.
Dominique De Cooman is a freelance drupal developer/consultant doing drupal development in the whole of Europe.
Feel free to contact me to hire me for your drupal development
Good suggestion craig, you
Good suggestion craig, you should indeed add checks when using hook_init() because its run on every page load. Also note that hook_init is not called when aggresive caching is on.
Even better is to include the drupal_add_js only where you script needs it and not in hook init.
Btw I also use the same technique you say to construct paths for the ajax calls :)