Can someone with more #JavaScript experience tell me what's an idiomatic way of solving the problem of an application that must fetch multiple URLs?
I currently have the issue that a lot of those URLs actually are the same, so I end-up with 40 requests for the same resource.
Is there an elegant way to solve this with minimal overhead over the native fetch API?
@mariusor have something like a global dictionary (object) of type <string, Promise>. If the url is already a key in the dictionary then just resolve the promise again, otherwise add to dictionary and resolve.