I’ve a dilema about the preconnect resource hint header.
The “preconnect all the things” approach means that i’m going to warm up every domain i will use in the current page load, that it’s good because as far i know Chrome keeps the connection open to that wormed up domain for 60 seconds or something like that. The risk here (i think) it’s to collapse the mobile connections right? to do too many things at the beginning… and also to increase the size of the initial http request header…
The other approach is to preconnect only the domains that affects the critical rendering path, here the page total load time will be increased because the following domains are not going to be warmed up.
I did some test but i’ve no RUM so they are synthetic tests that can misslead the conclusions, also the results are a little weird. I left the two screenshots attached.
What do you think it’s the best approach?