3 ms·
Great work. This is was sorely needed. May I ask why did you go with progressive enhancement instead of graceful degradation? Sort of like <img class="log
by duopixel 14y ago
Great work. This is was sorely needed.
May I ask why did you go with progressive enhancement instead of graceful degradation? Sort of like
<img class="logo svg" src="logo.png" ... />
This would allow old clients with javascript disabled to still display the image, but I'm not sure if it would cause duplicate requests in modern browsers.
- benhowdle89 14y agoYou're right, I think it felt more natural to do it the way I did. If I did it in the above way, then the browser would DL the PNG then the JS would cause the browser to go DL the SVG. As a %, the browsers that do support SVGs are far greater than those that don't. So those people are still getting a great experience, but the SVG supporting browsers getting an even better one!
- cleverjake 14y agoPersonally, I prefer the way it is being done. A majority of sites that would catering to non-javascript clients wouldn't be using SVG on top of that. Secondly, this prevents a majority of A grade browsers from double downloading.