My web app is referencing CDN to load libraries like React, ensuring that when the app is visited next time, React will be retrieved from browser cache.
When the user visits my app for the first time, there is big chance that the browser cache already has React fetched from some other CDN (result of visiting other apps also using React loaded from different CDN). The URL for React required for my app would be different, so the resource would be still downloaded. How to avoid that?
If it is possible to access browser cache from code, it would be possible to query by resource name and retrieve the resource containing 'react' and '17' so already existing, cached resource could be used as "React v. 17" when visiting my app for the first time.
Are there any planned/existing standards which would allow to state in runtime: "my app requires React v.17 - please reuse your already cached resource or use the resource with the given url (CDN link)"?