WPT not detecting CDN being used

When I run a test for one of our websites - www.mathletics.co.nz it gives an X for “Effective use of CDN” and says:

Use a CDN for all static assets: 0/100

However, almost all of the assets listed are being served off domains that are from our CDN (Akamai is our CDN provider by the way).

Of course, because I know this myself, I can effectively just ignore this score, but I am wondering how WPT’s CDN detection works, and why it wouldn’t be detecting our CDN?

Has anyone else had this issue or is it just me?

PS - sorry if this is the wrong place to post this thread.

I’ll take a look. Looks to be a bug in the CDN detection. It usually looks at the CNAME chain which should have worked in this case and then it also falls back to response-header detection (none of Akamai’s headers so the fallback didn’t catch it). Thanks for the heads-up.

I met this issue too. my testing site is anycodes.com

Actually, I think CDN detection should be based on the detection of anycast routing advertised for a particular host. We have the same issue for aura.travel.

A CDN does not need to be a well known CDN name. If a host servers content from multiple locations, that is a CDN.

My 2c :slight_smile:


To excavate this thread, we are running into the same issue having DDoS protection by myracloud in front of our CDN nodes.
However, we sent a custom X-CDN header, which could be a fallback solution to implement on WPT side to satisfy everyone else with the same issue.

Example URL: http://srv-live.lazada.co.id/cms/logo/themes_2014/2.jpg

Response headers:

HTTP/1.1 304 Not Modified
Server: myracloud
Date: Mon, 26 May 2014 07:33:02 GMT
Content-Type: image/jpeg
Connection: keep-alive
Last-Modified: Tue, 22 Apr 2014 12:34:36 GMT
ETag: “535661dc-ccc”
Expires: Wed, 11 Jun 2014 22:49:57 GMT
Cache-Control: max-age=2592000
X-CDN: 1

I’m seeing 250ms+ ping times to srv-live.lazada.co.id from the US. Is that actually on a CDN with distributed edge nodes? WPT doesn’t “Grade” the CDN because it may not make sense for all sites but I do want it to accurately reflect if the content is being edge-served from a global (or at least distributed for the market) platform.

An “X-CDN” header would let anyone arbitrarily spoof the results to make it look like it is being served from a CDN even if it isn’t. That wouldn’t be a problem if the site owner is doing it because it makes them feel better but if it is being done by a 3rd-party for included snippets or something like that then that would be fooling the site owner into thinking the content is actually coming from a CDN when it isn’t.

Granted, the current logic can be tricked if you really wanted to but I’d rather not encourage that behavior. If you see cases where an actual CDN is not being detected then I’d be happy to fix the logic but I’m not really interested in labeling things as a CDN that aren’t.