9 ms·
Wouldn't this be resolved by setting a data-1x property (leaving the src/background-image property blank)and then running javascript to substitute the data-1x p
by mds101 13y ago
Wouldn't this be resolved by setting a data-1x property (leaving the src/background-image property blank)and then running javascript to substitute the data-1x property for non-retina devices and data-2x property for retina devices?
- ricardobeat 13y agoNot that simple. That would be fine for a client-side app, but not for a public-facing site: 1) no javascript = no images. crawlers/bots/archival services won't see them - google might even penalize you for broken image sources. one error in your main js file and all images are toast. needs other workarounds. 2) longer page load times unless you use inline scripts 4) extensions like readability, pinboard, weheartit, etc, might break