How to know page is served from server,dispatcher and CDN | Community
Skip to main content
Level 4
March 17, 2022
Solved

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

  • March 17, 2022
  • 3 replies
  • 2822 views

Hi,

 

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

 

Thanks

Ganesh

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

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/

3 replies

joerghoh
Adobe Employee
Adobe Employee
March 17, 2022

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.)

Level 4
March 17, 2022

Yes, we are using AEM as a cloud service

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
March 17, 2022

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/

SundeepKatepally
Community Advisor
Community Advisor
March 18, 2022

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

 

Example :