Expand my Community achievements bar.

SOLVED

How to know page is served from server,dispatcher and CDN

Avatar

Level 5

Hi,

 

How can I get to you know, whether page is served by server, dispatcher or CDN from developer tool?

 

Thanks

Ganesh

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

For AEM as a Cloud Service you have a CDN by default (Fastly), so for CDN hits/misses you can check the x-cache header (see [1]).

In case of CDN misses the next layer is the AEM dispatcher, which is fully under your control. IIRC the vhost blueprint adds a "x-vhost" header to the response (mostly for debugging), but it does not indicate if it's a hit in the dispatcher cache.

 

Dispatcher cache misses are handled by AEM itself, so you could add a special header (which is not cached on the dispatcher, in case you have enabled header caching) to indicate that.

 

But in general AEM/dispatcher is not verbose when it comes to indicate if a request was a cache hit or not. Because it could also be misused. But of course you can add all by customization.

 

 

[1] https://developer.fastly.com/reference/http/http-headers/X-Cache/

View solution in original post

4 Replies

Avatar

Employee Advisor

Are you referring to AEM as a Cloud Service? (In any other setup it's most likely depending on your setup, because both AEM and the Dispatcher do not add special by default to make that visible.)

Avatar

Correct answer by
Employee Advisor

For AEM as a Cloud Service you have a CDN by default (Fastly), so for CDN hits/misses you can check the x-cache header (see [1]).

In case of CDN misses the next layer is the AEM dispatcher, which is fully under your control. IIRC the vhost blueprint adds a "x-vhost" header to the response (mostly for debugging), but it does not indicate if it's a hit in the dispatcher cache.

 

Dispatcher cache misses are handled by AEM itself, so you could add a special header (which is not cached on the dispatcher, in case you have enabled header caching) to indicate that.

 

But in general AEM/dispatcher is not verbose when it comes to indicate if a request was a cache hit or not. Because it could also be misused. But of course you can add all by customization.

 

 

[1] https://developer.fastly.com/reference/http/http-headers/X-Cache/

Avatar

Community Advisor

check for response headers in the network tab, on the document that is served

 

Example :

SundeepKatepally_0-1647575035391.png