Search code examples
performancecdnwebpagetest

How CDN detection works in webpgatest


I did some performance optimization (and I test it with webpagetest.org) but I still have problem with CDN detection. It looks like on screen: enter image description here

All requests (except first which is http request for html) with red X icon in last column are:

  • for assets (css, js, images or fonts)
  • from same domain (different than main application domain)

What should I do to have assets detected as CDN on this test???


Solution

  • WebPageTest just uses a list of the most common CDN providers and then parse the assets request header :

    CDN_PROVIDER_HEADER cdnHeaderList[] = {
        {"server", "cloudflare", _T("Cloudflare")},
    

    to check (in this case) if there is a server key containing cloudflare.