You are correct in that many people use CDNs to load static content faster. However CDNs can also be used to accelerate dynamic content as well. (Disclaimer: I work at Akamai, and while all of these examples are possible w/ Akamai your mileage may vary with other CDNs).

Here are some ways that a CDN can impact TTFB for HTML in addition to what MachMetrics mentioned above -

- By routing the user to a nearby CDN server, TCP and TLS connect times are reduced because the round trips are shorter than they would be w/o a CDN.
- Redirects often count against the TTFB metric. Many times redirect rules can be configured at the CDN, reducing the round trip time for the redirect. This means the user will be able to request the actual HTML page sooner.
- If a HTML page is cacheable, or conditionally cacheable, that can reduce the TTFB time considerably since the processing overhead and transfer time from the origin is eliminated when served from a CDN cache.
- Even if the HTML is not cacheable, CDN optimizations across the middle mile can reduce the time it takes to transfer the HTML from your server to the client.