Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Testing Cache control headers


Level 2

How to test the cache control headers from the browser?


<LocationMatch "^/content/.*\.(html)$">
     Header set Cache-Control "max-age=200"
     Header set Age 0


How to test this cache control header from browser network?

5 Replies


Community Advisor

You just simply step on the .html resource (page.html) and check the Headers section, which will show the "cache-control" header and the value should match your configuration.


The "Age" header is primarily used by intermediary caches to determine the freshness of cached content and to make decisions about serving cached responses. It is not typically exposed or visible in the browser's network tab, as it is more relevant to the functioning of proxy servers and other intermediary caching systems.


Esteban Bustamante

Thanks for the response @EstebanBustamante . This is the configuration i have in my host file - 


However the response i see in the browser is this - 


I am not sure why I'm seeing no-cache in the cache control.


Community Advisor

Check the following:

1. Do you have any configuration under you /clientheaders that may be conflicting? (https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/configuring/dispatcher-c...)

2. Try to restart the Apache server after your changes

3. Make sure your page is not served from the cache (CDN, Dispatcher or browser)


Esteban Bustamante


Community Advisor

Hi @Silvia_Joyce_Balraj  Both of these commands(first and second line) are used to control caching behavior. The first command sets a maximum age for the response, allowing it to be cached for a certain period. The second command resets the age to 0, indicating that the response should be considered fresh and not served from cache.


hope this helps.





Community Advisor

Hello @Silvia_Joyce_Balraj 


After making changes to cache-control headers, always assure that the existing cached page on dispatcher is flushed.

If the pages are served from CDN as well, then first debug by accessing pages via dispatcher URL. If that looks good, either flush the CDN cache or wait for it to clear.


Also, did you configure this?




Aanchal Sikka