Latest post Tue, Mar 2 2021 7:07 PM by Vadym. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • Mon, Jan 25 2021 9:27 PM

    How to avoid Chrome caching issues in CloudUX apps

    Hi,

    We have written our own custom CloudUX integration which we are updating quite frequently. We have noticed that Chrome is caching quite aggressively, so we must clear all site data on the clients to be sure that users are looking at the latest version of our app.

    Is there a way to invalidate the browser cache by adding a timestamp or randomized number to our app after deploying a new version? The goal is to be able to deploy a new version without having to ask all users to clear their local browser cache.

    Hope anyone can shine a light on this.

    Thanks, Rick

    (sorry for the duplicate, I posted this question also in the Avid MediaCentral Forum but I think it's more appropriate here)

  • Wed, Feb 3 2021 3:29 PM In reply to

    • Vadym
    • Top 500 Contributor
    • Joined on Thu, Apr 17 2014
    • Posts 262
    • Points 3,110
    • ! Avid Employee
      Avid Developer Moderator

    Re: How to avoid Chrome caching issues in CloudUX apps

    Hi Rick,

    Could you provide more details on the content that is being chached? Are you deploying your feature packs with different versions when you see this?

    CloudUX has a built in functionality to invalidate static resources caching which requires that you increment feature pack version each time you build a new one with the starter kit to work.

    Thanks

  • Thu, Feb 11 2021 1:57 PM In reply to

    • matev
    • Not Ranked
    • Joined on Tue, Aug 2 2016
    • Posts 19
    • Points 225

    Re: How to avoid Chrome caching issues in CloudUX apps

    Hi Vadym,

    I can also confirm this behaviour at our installations. The older version of the statical resources are displayed in Cloud UX UI even if we increment the feature pack version each time when we build it with the starter kit.

  • Wed, Feb 17 2021 5:32 PM In reply to

    • Vadym
    • Top 500 Contributor
    • Joined on Thu, Apr 17 2014
    • Posts 262
    • Points 3,110
    • ! Avid Employee
      Avid Developer Moderator

    Re: How to avoid Chrome caching issues in CloudUX apps

    Hi Mate,

    Sounds interesting. Could you please do the following and let us know the result.

    1. Log into your CloudUX

    2. Copy and open the following URI replacing host name with your CloudUX host in the same browser window

    {hostname}/apis/avid.plugins.list;version=0;realm=global/pods

    you should see the list of apps. Copy one for your app like below

    "url": "http://avid-ui-core-app/plugins/",

    "basePath": "/plugins/core-app/plugins",

    "hash": "c3dd3e57",

    "isPrimary": true

    3. Install newer version of your app, repeat steps and compare hash values. Let us know hash for old and new versions.

  • Fri, Feb 19 2021 12:13 AM In reply to

    Re: How to avoid Chrome caching issues in CloudUX apps

    Hi Vadym,

    I can confirm that the hashes are updated on each deploy, see screenshot. We are bumping the version number up on each deploy, this seems to work okay with just a browser refresh. But still on some clients we need to clear the application cache, I can't figure out what causes this behaviour.

    I will keep you posted after we have done some more testing but we're open for any suggestions.

    Regards, Rick

     

  • Tue, Feb 23 2021 9:24 AM In reply to

    • matev
    • Not Ranked
    • Joined on Tue, Aug 2 2016
    • Posts 19
    • Points 225

    Re: How to avoid Chrome caching issues in CloudUX apps

    In addition, this problem in MediaComposer panel is worse. We still have not found the way how to clear the cache of the MediaComposer panel. Clearing the chrome cache does not work, restarting MediaComposer also does not work. Sometimes we need to do several computer restarts and wait days to get the newer version of the app in the MC panel.

  • Tue, Mar 2 2021 7:07 PM In reply to

    • Vadym
    • Top 500 Contributor
    • Joined on Thu, Apr 17 2014
    • Posts 262
    • Points 3,110
    • ! Avid Employee
      Avid Developer Moderator

    Re: How to avoid Chrome caching issues in CloudUX apps

    Thanks for the confirmation Rick,

    I have next steps to verify that the hash corresponds to the cached resources.

    Please do the following next time you see the issue AND make sure that hash of the new version is different from the previous versions of the app. If hash is the same the steps below do not apply.

    Verify that service worker is registered on your system:

    - Log into your CloudUX.
    - Open Chrome DevTools inside CloudUX. Press F12 key.
    - Open Console tab and filter the results by ‘[Service Worker]’.
    - If Service Worker was successfully installed you will see: {{[Service Worker] Registration is successful with scope: {upstream}

     

    Using hash from the new version of the app, make sure that resources are cached with it

    - Open Application tab inside Chrome DevTools.
    - Navigate to: Cache -> Cache Storage -> {Your Resource Name} :{hash}

    Now verify that your resources are actually provided by the service worker, you should see {ServiceWorker} in the size field for your resource
    - Navigate to Networktab inside Chrome DevTools.
    - Filter all queries by your resource name/app and check that it was served from the Service Worker.

    See the screenshots below for your reference, let me know what you see on your side


Page 1 of 1 (7 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller