Hi, we are experiencing inconsistent rendering times of the uploader control. It can take up to 30 seconds for the control to render and replace the default text that the browser shows for an input file control.
Looking in DevTools, it looks like there are a number of scripts from the filepond js library used by the plugin that load from unpkg.com. Most of these files are requested without a version number from unpkg and then redirect to the latest version. This causes a delay due to the redirect and because with this method, unpkg only caches the file for 10 minutes.
This is not unpkg best practice for including js - read more here - UNPKG
URLs that do not specify a package version number redirect to one that does. This is the
latest
version when no version is specified, or themaxSatisfying
version when a semver version is given. Redirects are cached for 10 minutes at the CDN, 1 minute in browsers.If you want users to be able to use the latest version when you cut a new release, the best policy is to put the version number in the URL directly in your installation instructions. This will also load more quickly because we won’t have to resolve the latest version and redirect them.
To @zeroqode1 - could you update the way the plugin is loading the js files to the best practice to improve the time to load?