Cache control header is missing for client libs calls | Community
Skip to main content
March 28, 2024
Solved

Cache control header is missing for client libs calls

  • March 28, 2024
  • 1 reply
  • 538 views

Hi Connections, 
Can someone help me here why the cache control header is missing in the client libraries call?

Here is the my project client libraries call look like.  We have created rewriter configuration in the project and added cache header rules as well in the apache config.

And in local environment also the cache header is not showing.

 

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 PavanGaddam

@venkat_plansee Can you share the dispatcher configuration added for caching the js and css. It should look something similar to the below.

# Theme Sources via Clientlib: long-term caching (30 days) for immutable URLs, background refresh to avoid MISS <LocationMatch "^/etc\.clientlibs/.*\.(?i:js|css|ttf|woff2)$"> Header set Cache-Control "max-age=2592000,stale-while-revalidate=43200,stale-if-error=43200,public,immutable" "expr=%{REQUEST_STATUS} < 400" Header set Age 0 </LocationMatch>

 

Also check if you have the /headers configuration as shown here.

1 reply

PavanGaddamAdobe EmployeeAccepted solution
Adobe Employee
March 11, 2025

@venkat_plansee Can you share the dispatcher configuration added for caching the js and css. It should look something similar to the below.

# Theme Sources via Clientlib: long-term caching (30 days) for immutable URLs, background refresh to avoid MISS <LocationMatch "^/etc\.clientlibs/.*\.(?i:js|css|ttf|woff2)$"> Header set Cache-Control "max-age=2592000,stale-while-revalidate=43200,stale-if-error=43200,public,immutable" "expr=%{REQUEST_STATUS} < 400" Header set Age 0 </LocationMatch>

 

Also check if you have the /headers configuration as shown here.