backbone-boilerplate/core — pull request #7 by wookiehangover (2012-04-21 04:39:50+00:00)
Title: Improved $.ajax options for fetchTemplate()

This initially came about after running into caching issues when using a server other than what's provided by `bbb server`.

The solution was to change `$.get` to `$.ajax` and set `cache: false` to disable any template caching. Additionally, `global: false` is set to prevent any global ajax handlers from firing when loading templates. The reasoning being that in production you should always be running the release task and pre-compiling your templates, in which case there would normally be no ajax events trigger as a result of template loading.

I feel like these two additions make for a more reasonable set of defaults for async template loading--but in any case I think `$.ajax` should be preferred over `$.get` so that adding your own options is slightly easier.

Curious to hear your thoughts on this...

Thanks!