Expand my Community achievements bar.

SOLVED

browser cache bust to fetch latest launch.js

Avatar

Level 3

Hi All,

 

I have integrated AEM - CJA using Adobe Launch. I have followed self-hosting library approach  using download link . 

The issue i am facing is, launch.js is  cached in browser and continues to be served from browser memory.

How can i make sure that the launch.js is not served from browser memory rather fetched from AEM so that it reflects the latest config.

I am exploring cache-control header approach , can some one suggest me whats the best approach and provide me with sample config for that.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

 

Then you can try adding dynamic value and append to the launch file

 

<script src = "${launchScript}?${dynamicvalue}"></script> - dynamic value can be generated using the time/date into milliseconds

View solution in original post

5 Replies

Avatar

Employee Advisor

I feel we could bust JS file by hash value. Earlier we followed this approach and it worked perfectly.

We have used a hash parameter generator. Combination of the file path and the date/time or we can just use date/time combination to generate the hash parameter.

Avatar

Community Advisor

Hi,

 

Try to add versioning to the clientlibs which will render the latest when version changes. 

https://adobe-consulting-services.github.io/acs-aem-commons/features/versioned-clientlibs/index.html

 

 

Avatar

Level 3

Hi Ravi,

 

we can not use versioned clientlibs as this isn't the regular clientlibs . The launch js is updated in the path /var/cq/dtm-reactor/clientlibs folder from Adobe Akamai download link

Avatar

Correct answer by
Community Advisor

Hi,

 

Then you can try adding dynamic value and append to the launch file

 

<script src = "${launchScript}?${dynamicvalue}"></script> - dynamic value can be generated using the time/date into milliseconds