Why Cloudinary is making too many requests? How to fix it?
I am working on a React Project and using cloudinary to store images on the cloud, but when i open the network tab in dev tools I sees hundreds of similar requests made by cloudinary.
Best Answers
-
I am using 11 instances of upload widget, it is basically an admin page for a E-commerce website and I am using cloudinary to store the images. There are lot more than 11 requests, around 200 requests. Would that affect the performance of my website? I can share the github repository if you would like a deeper look into it. I am using cloudinary for the first time so I don't know if it is normal.
0 -
If you load the widget multiple times, all of the widget's resources will be loaded multiple times by the browser.
If the repeated use of the widget is causing a performance issue in your application, it may be a better solution to have a single instance of the widget and trigger it using an event handler shared by multiple buttons on your page. In that case, your code can update your application state after each upload based on which button initialised that upload, but if you want to use multiple copies of the widget, that should work too.
1
Answers
-
Hi Himnanshu,
What do you mean by "too many" requests? Can you share more about what your application is doing when you see those requests, and how you're using Cloudinary's SDKs or widgets?The multiple calls to the .json file in the top of your screenshot imply that there are multiple instances of the Upload Widget used on the page, and the spacing of the requests suggests you may be removing and re-adding a copy of the widget multiple times - if so, that would explain multiple calls to the widget's code and resources
Regards,Stephen
1