Cache-control in genesys.min.js - Web Messenger Integration

Dear developer community,
I opened a ticket but they told me to post it here.

In order to prefetch and serve from the cache its script, we’d like to change the cache-control directive for the file https://apps.mypurecloud.ie/genesys-bootstrap/genesys.min.js

The current directive is set to: max-age=0, no-cache.

For our js files we usually advise for 2 weeks of max-age: public, max-age=1209000, immutable

If it’s considered too long by Genesys we can try and see if a shorter time may work as well.

Please let us know if this change is feasible.
Thank for the help!

Serena

#cache #webmessenger #integration #js

Hi @Serena_Spaccesi,

It is not possible to exactly do what you are asking, but our assets are already technically served from the cache. Even though chrome network tab doesn't explicitly say this, here is how you can evaluate.

When you initially load genesys.min.js, it will download the full file reflecting the full file size in the network tab traffic logs.

Then on the subsequent page reload, it will not download the full file but serve from the cache, technically soft-caching as shown in the below image where you can see only 327 bytes fetch in the network logs for this file.

It will download the full file again when anything changes in our assets, for example when we do a new release it will automatically reflect for you without any delay because a soft-cache check is performed that will let browser know to re-download.

Hope this should answer what you are looking for.

Thanks,
Ranjith Sai

Hi @Ranjith_Manikante_Sa ,
thanks for the info, now the behavior is more clear.
This cache is actually working in tandem with our prefetch since the second file downloaded is the 300ish Byte one and not the 97 kB one.

Since we’re already prefetching genesys.min.js, do you think we could also prefetch other resources used by the chatbot, like https://apps.mypurecloud.ie/messenger/genesyscloud-messaging-transport.mod.js and https://apps.mypurecloud.ie/genesys-bootstrap/plugins/genesysvendors.min.js, or are these too susceptible to code changes?

Thanks in advanced

Serena

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.