WebPagetest Forums
CDN Functionality - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: CDN Functionality (/showthread.php?tid=14966)



CDN Functionality - coolsocks - 07-08-2017 03:15 AM

Hi there,

Great tool! I've really enjoyed using it. I had a question about one part of the functionality though --- how do you detect CDN use for a webpage and request?

I was taking a look at the code and it looks like you examine the header, but there is not "cdn" header, at least to my knowledge. How do you do that?

I'm curious and would appreciate the insight.


RE: CDN Functionality - pmeenan - 07-08-2017 04:19 AM

It has a list of known CDN domains (for cases where the domain is CNAME'd to a CDN) as well as a fallback to cdn-specific response headers: https://github.com/WPO-Foundation/webpagetest/blob/master/agent/wpthook/cdn.h