Hi all,
Any Changes to the css and js files under the clientlibs is not picked up by the dispatcher. we need clear the dispatcher cache manually to get the latest changes picked up.
Is there any specific configuration to automatically invalidate the css and js files when there is a change?
any suggestions appreciated.
Thanks
Solved! Go to Solution.
Hi,
I would recommend to use ACS AEM Commons' feature "Versioned clientlibs" [1]. Then this is not a problem any more, as changes to any clientlib will result in a different hash value.
regards,
Jörg
[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs.html
Views
Replies
Total Likes
You do activate tree ( of the location of the clientlibs) after the change
Hi,
I would recommend to use ACS AEM Commons' feature "Versioned clientlibs" [1]. Then this is not a problem any more, as changes to any clientlib will result in a different hash value.
regards,
Jörg
[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs.html
Views
Replies
Total Likes
As Jorg mentioned, version clientlib from ACS is a good option. Every time you change some code in css/js. Different filename for clientlib (clientlib + hashvalue of data) gets generated. and Since its a new file name, dispatcher will will get it from publish.
Thanks
Views
Replies
Total Likes
Thank you all for the Suggestions. we are clearing the cache manually to solve the issue at present and started looking in to ACS commons .
Views
Replies
Total Likes
Hi Jorg,
I'm trying to use version clientlibs for similar requirement. Could you please throw some light on how versioned clientlibs work? How does AEM render the HTML / page with new versioned JS reference given the page / html is already cached?
For example, I have home.html cached and referenced with JS version 'footer.min.abc.js'. Now I make a change in my footer.js. New versioned JS will have 'footer.min.xyz.js'. How AEM render the HTML/page with new versioned JS where my home.html is already cached with footer.min.abc.js?
Thanks and Regards,
Ruben Fernando
Views
Replies
Total Likes
Hi Ruben,
javascript files typically only change when you deploy code. In that case you are supposed to clear the dispatcher anyway, so the pages get re-rendered using the references to the new javascript files.
The versioned clientlibs allow you only to set an unlimited lifetime (for example an expiration date in 2020) to javascript files.
Jörg
There is an add-on for Adobe AEM that does resource fingerprinting (not limited to clientlibs, basically for all static website content), Cache-Control header management and true resource-only flushing of the AEM dispatcher cache. It also deletes updated resources from the dispatcher cache that are not covered by AEM's authoring process (e.g. when you deploy your latest code). A free trial version is available from https://www.browsercachebooster.com/
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies