Preloading resources with TemplateUtils