When a HTML page has an image embedded twice:
<img src="foo.jpg">
<img src="foo.jpg">
This results in only 1 HTTP request, even if there were no caching headers. This makes a lot of sense.
I'm curious under which circumstances a browser will do this. Will it do it for 2 subsequent fetch() calls? For all 'safe' http methods? If yes, how much time does there need to be between calls before it will do a new one? Or maybe it will only de-duplicate if the last one is still in flight? What heuristics will browsers use to figure out if requests can be de-duplicated?