Genesys Cloud - Developer Community!

 View Only

Sign Up

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

    Posted 04-07-2025 11:06

    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.

    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?

    Thank for the help!


    #ArchitectureandDesign
    #DigitalChannels
    #Implementation
    #Unsure/Other

    ------------------------------
    Serena

    ------------------------------


  • 2.  RE: Cache-control in genesys.min.js - Web Messenger Integration

    Posted 04-07-2025 11:46

    Hi Serena, 

    This was posted in the main Genesys Cloud Community, I will move this across the new Developer Community



    ------------------------------
    Sam Jillard
    Online Community Manager/Moderator
    Genesys - Employees
    ------------------------------



  • 3.  RE: Cache-control in genesys.min.js - Web Messenger Integration

    Posted 04-08-2025 00:16

    Hi Serena - what are you trying to solve with this suggested change? 



    ------------------------------
    Angelo Cicchitto
    Genesys - Employees
    ------------------------------



  • 4.  RE: Cache-control in genesys.min.js - Web Messenger Integration

    Posted 04-10-2025 10:01

    Hi @Angelo Cicchitto,

    thanks for the question. This change are to optimise the performance.

    Can you help me?

    Thank you



    ------------------------------
    Serena Spaccesi
    Indra Italia spa
    ------------------------------



  • 5.  RE: Cache-control in genesys.min.js - Web Messenger Integration

    Posted 04-15-2025 12:29

    Hi Serena,

    All our assets are "soft-cached" in general. Web Messenger assets follow the cache control settings which is `cache-control: max-age=0, no-cache`. 

    But this doesn't mean that we re-fetch the complete asset every time, but rather do a soft-check to see if anything is changed from the previous one:

    • If nothing then it is used from the cache.

    • If changed, it will re-fetch the asset.

    Even without the cache-control headers, our hosting does provide Etag headers, which means the full data is not requested every time by the browser. There is a request, but the browser will send an If-None-Match​ header, and the server will respond with `Etag` header which is cross-checked. If they are same, meaning nothing has changed, so there is no any transfer of data. It's not optimal, but it's not as slow as a full re-fetch.

    This is required for us to check if something has changed from the last deploy, so any new deploy changes are automatically reflected for you. This applies to all Web Messenger CDN assets. Hope this clarifies.

    Thanks,

    Ranjith Sai



    ------------------------------
    Ranjith Manikante Sai
    Senior Manager, Development
    ------------------------------