From 3bdfbfdef325586ddb746ac5190abb2e8e34b331 Mon Sep 17 00:00:00 2001 From: Anov Siradj Date: Tue, 18 Oct 2016 19:37:00 +0700 Subject: [PATCH] fix link to single-file-components.html --- src/_posts/why-no-template-url.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_posts/why-no-template-url.md b/src/_posts/why-no-template-url.md index fe40415646..f6fbabe2dd 100644 --- a/src/_posts/why-no-template-url.md +++ b/src/_posts/why-no-template-url.md @@ -13,7 +13,7 @@ First, it allows us to write our template in a separate HTML file. This gives us Second, because `templateURL` loads the template via Ajax at runtime, you don't need a build step in order to split up your files. This is convenient during development, but comes at a serious cost when you want to deploy it to production. Before HTTP/2 is universally supported, the number of HTTP requests is still probably the most critical factor in your app's initial load performance. Now imagine you use `templateURL` for every component in your app - the browser needs to perform dozens of HTTP requests before even being able to display anything! In case you don't know, most browsers limit the number of parallel requests it can perform to a single server. When you exceed that limit, your app's initial rendering will suffer for every extra round trip the browser has to wait for. Sure, there are build tools that can help you pre-register all those templates in `$templateCache` - but that shows us a build step is, in fact, inevitable for any serious frontend development. -So, without `templateURL`, how do we deal with the development experience problem? Writing templates as inline JavaScript strings is terrible, faking templates with `