Asynchronous Template Loading and Caching
for jQuery Templates

download tmpload<1KB minified

Loading your templates from external files is awesome.

Loading your templates only moments before they're needed is even awesomer.

Declare one template

$.tmpload('search', 'path/to/search.tmpl');

Or declare groups of templates

    name: 'search',
    url: 'path/to/search.tmpl'
    name: 'comments',
    url: 'path/to/comments.tmpl'

These templates haven't downloaded yet (that's a good thing).

Load and cache intelligently

  //They're probably about to search, so...

The search template is now downloaded and cached in the background.

Ready when they need it


The template is now loaded from the cache.

If the template isn't already cached, it is downloaded immediately and saved for later.

© 2011 Mark Dalgleish. This plugin is released under the MIT License
Follow me on Twitter! @markdalgleish

Fork me on GitHub