User:Sumit.iitp/SrcsetInBanners

A js polyfill for srcset for banners would solve the problem of support for browsers which is currently limited. However a js approach would mean downloading two images, one specified by src attribute which is loaded immediately and one loaded by the polyfill after necessary calculations. The only way to avoid that is to avoid the src attribute which however would mean no banners in case js is disabled. See here. Considering avg. size of 640px banner as 400kb and a 1280px banner as 600kb, we end up downloading 600kb+400kb=1000kb worth of image when using a polyfill. However, going ahead with just a 1280px default banner when srcset is not supported, we download only a single image and hence less bandwidth is used. It turns out that any solution that uses javascript to deliver correct size banners, would have to wait for srcset attribute to load by which time, the image specified in src is already loaded. Therefore a truly workable solution would be possible if the correct nature of image to be delivered is somehow determined on server-side.