It's because they're using an url shortener in a non-twitter/character limited situation. Makes the browser need to go through a couple of jumps to load something that the user will want to load fast.
Oh, I understand. Whenever I read the Hogan site, initially, I didn't realize that they were suggesting that people actually use that URL in production.
Of course they aren't advocating that. They're just saying you can try it out by dropping that script tag on your page.
Their first suggestion, and the one they are definitely implicitly recommending, is: "Use it as a part of your asset packager to compile templates ahead of time..."
> I'm thinking it may possibly respond immediately with cached results.
Just because nobody explicitly said it - a 301 redirect is actually cacheable per §10.3.2 of RFC 2616. But google doesn't set a long cache duration - another one of your responders posted the response headers, it was 86400s which is 1 day.
Comments
I don't understand the problem. What is wrong with the example they've given?
It's because they're using an url shortener in a non-twitter/character limited situation. Makes the browser need to go through a couple of jumps to load something that the user will want to load fast.
Also, it's bad practice to obfuscate the urls to scripts (outside of an automatic concat/compress process), especially external ones.
Oh, I understand. Whenever I read the Hogan site, initially, I didn't realize that they were suggesting that people actually use that URL in production.
Of course they aren't advocating that. They're just saying you can try it out by dropping that script tag on your page.
Their first suggestion, and the one they are definitely implicitly recommending, is: "Use it as a part of your asset packager to compile templates ahead of time..."
Is it possible using goo.gl might get you something like a poor mans CDN? I'm thinking it may possibly respond immediately with cached results.
No, it responds with a redirect:
Edit: I suppose the headers are more important:No. Regardless, a second DNS query will have to be performed by the client when Google responds with the permanent redirect.
> I'm thinking it may possibly respond immediately with cached results.
Just because nobody explicitly said it - a 301 redirect is actually cacheable per §10.3.2 of RFC 2616. But google doesn't set a long cache duration - another one of your responders posted the response headers, it was 86400s which is 1 day.
It's almost as if they think RTTs are free.