Tag Archives: performance

If you have an MVC bundle that you need to defer or async loading, you can use the following C# classes. public static class UtilityHelper { public static IHtmlString RenderAsyncScript(string virtualPath) { return Scripts.RenderFormat(@”<script src=””{0}”” async></script>”, virtualPath); } public static IHtmlString RenderDefer(string virtualPath) { return Scripts.RenderFormat(@”<script src='{0}’ defer></script>”, virtualPath); } } For example, to load […]