For full functionality srcsetyou will have to cache all permissions.
Although the density of the screen may seem to be a fixed property of the device, it is actually dynamic, for example. The smartphone can display / broadcast on the TV screen. On a desktop with multiple displays (such as a Retina MacBook with an external display), the screen resolution may change when you move the browser window. All these changes can happen offline after you have done the caching, so you cannot know exactly which permissions will be selected.
- 2x . DPI , , .
- srcset URL- , , , . BTW: onerror="โฆ" , , - , img.complete && !img.naturalWidth, .