3 ms·
> 1) Put your assets on the same domain. It's quite a common optimization to distribute assets on multiple domains. This is because only a limited number of co
by dtech 12y ago
> 1) Put your assets on the same domain.
It's quite a common optimization to distribute assets on multiple domains. This is because only a limited number of connections are allowed to made per domain (changes with HTTP2).
Furthermore, a CDN often has a faster connection to the user and you might benefit from it already being in the cache on first connection.
- tedunangst 12y agoThat was about five years ago. all the browsers should support six or more connections now.
- sokoloff 12y agoWe use a cookieless domain for most of our static content (as the name implies, to avoid sending cookies on those requests, which helps the desktop case a little bit, but helps the mobile use case a lot). We originally did it because of the 2 connections per origin limit, but left it in place once that went away and was replaced with a huge uptick in mobile users. We should test whether we should move the CSS back to the primary domain and pay the cookie uplift penalty to avoid the DNS and TCP penalty for that. (Another poster below rang that bell for me and it makes logical sense, but need to verify via testing.)