I have a site with 40+ css and scripts. When I load them from the origin vs cdnjs, the speeds are very comparable. Only 0.2s difference. Could I be doing something wrong? Is my testing procedure not 1:1 ?
- Page Rule: wildcard = bypass cache, disabled performance, disable opportunistic encryption
- Browser: cache disabled.
Test 1: https://domesticfirst.com/
Loads CSS and JS from the origin.
1.29MB / 2.98KB transferred
DOM loaded: 944ms
Test 2: https://domesticfirst.com/?cdn
Loads CSS and JS from CDNJS (hosted by CloudFlare)
1.26MB / 292.73 KB transferred
DOM loaded: 771ms
How can 36 round trips to the origin be only 200ms slower?
Just a note… the page still loads in http/2 regardless of ‘disable opportunistic encryption’ for the zone and in the page rule.
I’m not complaining either way… just would like to know more about this. Any insight is appreciated!