Closed brendanheywood closed 6 years ago
The target pages we should consider using this method would be ones where google are referring to us:
home page area pages route pages articles
We have to make sure all redirects are determined before we lookup these pages. For example, what happens if we look up a merged page?
Will this make a difference on how fast the page seems to google index bots?
For merged pages don't we add an alternate url stub which means both URLs serve and there is no redirect?
I suspect google regularly tests with both cold and warm cache. So yes this will effect their cold cache scrapes, Google invented this spec
This has been done for a while, but just added a second hint for image.thecrag.com for next release too
https://www.igvita.com/2015/08/17/eliminating-roundtrips-with-preconnect/
https://w3c.github.io/resource-hints/
Preconnect pre-emptively saves a few round trips on subsequent dependant resources like static and possible other resources like google maps. It only has value on cold cache loads and only has value when served on the initial document, and when the header is flushed as soon as possible and not sent along with the main html document.
This would have no value on subsequent pages or requests so adding to cgi or avatars would be pointless, just templates is perfect.
It can't be sent before a redirect so we can only apply this to places where we know we will never redirect (should be OK as most or all template pages are anon?), or at least after any redirect logic is applied.