Expand my Community achievements bar.

Cache control header is missing for client libs calls

Avatar

Level 1

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.

venkat_plansee_0-1711623140289.png

 

1 Reply

Avatar

Employee

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