How to test the cache control headers from the browser?
eg
<LocationMatch "^/content/.*\.(html)$">
Header set Cache-Control "max-age=200"
Header set Age 0
</LocationMatch>
How to test this cache control header from browser network?
Views
Replies
Total Likes
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.
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.
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)
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.
-Thanks
Bilal
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?
Define DISABLE_DEFAULT_CACHING
Views
Likes
Replies