Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

http Age header generation on dispatcher

Umesh_Thakur
Community Advisor
Community Advisor

Dear Members,

We are running thru one issue, where pages are not bing cached at the Akami(CDN) level due to the  "Age"(not the max-age directive) header being added from the origin or dispatcher.

We don't have any code or configuration for the same in our project. Do anyone have any idea, what may be causing the issue?

If anyone might have faced such a scenario please help us to identify.

Thanks

Umesh Thakur

1 Accepted Solution
markus_bulla_adobe
Correct answer by
Employee
Employee

Hi @Umesh_Thakur!

It's a bit hard to tell where the HTTP Age Header originates without any knowledge of your setup.

I would recommend to perform an analysis to identify the origin (first step: is it set by AEM or the dispatcher?).

 

As a short term solution, you could use mod_headers in the Apache HTTPD (dispatcher) level to remove the unwanted header from your responses:

Header always unset Age

The AEMaCS documentation on caching provides some additional details on response headers.

 

You may also want to check if your dispatcher is configured to cache HTTP response headers . In this case, you would want to invalidate the cache after performing changes.

 

Hope that helps!

View solution in original post

4 Replies
Asutosh_Jena_
Community Advisor
Community Advisor

Hi @Umesh_Thakur 

 

The Age header contains the time in seconds the object has been in a proxy cache.

 

The Age header is usually close to zero. If it is Age: 0, it was probably just fetched from the origin server; otherwise It is usually calculated as a difference between the proxy's current date and the Date general header included in the HTTP response. So it should not impact the caching at all.

 

The Access-Control-Max-Age response header indicates how long the results of a preflight request (that is the information contained in the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) can be cached.

 

So if you have Max-Age header present and the value is 0 or -1 then the content will never be cached at CDN.

Anoother reason of no cache could be the cookie value, If there are any cookie which contains different value each time the same resource has been requested then CDN will always return a new copy of content than the cached copy.

 

Thanks!

markus_bulla_adobe
Correct answer by
Employee
Employee

Hi @Umesh_Thakur!

It's a bit hard to tell where the HTTP Age Header originates without any knowledge of your setup.

I would recommend to perform an analysis to identify the origin (first step: is it set by AEM or the dispatcher?).

 

As a short term solution, you could use mod_headers in the Apache HTTPD (dispatcher) level to remove the unwanted header from your responses:

Header always unset Age

The AEMaCS documentation on caching provides some additional details on response headers.

 

You may also want to check if your dispatcher is configured to cache HTTP response headers . In this case, you would want to invalidate the cache after performing changes.

 

Hope that helps!

View solution in original post

Umesh_Thakur
Community Advisor
Community Advisor

thanks for the response @markus_bulla_adobe ,

As I mentioned in the question itself we don't have any thing either in the code or in configuration, which is adding the Age header in the response.

mod_headers changes are there on plate, we are looking for the impact of it, if there is any.

Your response really helps.

Thanks again

Umesh Thakur