- Overview
- Transcript
3.4 The Downside: Browser Support
The solutions we’ve found so far are great, except for the nagging presence of dubious browser support. Let’s see how well all our approaches are supported.
Related Links
1.Hello!2 lessons, 03:03
1.1Welcome01:20
1.2Introduction to Responsive Web Design01:43
2.Working With Responsive Images5 lessons, 26:19
2.1Images in Web Design04:36
2.2The Classic Approach06:33
2.3Art Direction01:48
2.4Using CSS to Selectively Show Images10:49
2.5The Ideal Solution02:33
3.Existing Solutions7 lessons, 44:50
3.1Introducing the `srcset` and `sizes` Attributes14:25
3.2Using the Picture Element04:38
3.3Using Multiple Image Formats05:19
3.4The Downside: Browser Support02:20
3.5The Solution: a Polyfill05:36
3.6Other Solutions07:27
3.7Performance Considerations05:05
4.Conclusion1 lesson, 02:34
4.1Final Words02:34
3.4 The Downside: Browser Support
Remember, when we were talking about our ideal solution to responsive images it needed to meet three criteria. The first one, simple and semantic markup, then a great performance. And finally, the third one was large browser support. So let's analyze the picture element along with the source set and sizes attributes and see how it fits in our ideal solution. First of all, it's the markup and this one is pretty simple, especially if you're loading a, a small number of images. The picture element is self-explanatory and you can easily deduct that sources represents an image source. The source set attribute is also self-explanatory and sizes. Well, it's easy to remember. So, in terms of simple markup, I think we're doing pretty well. Maybe here the exception would be media queries inside HTML. As you know, it's not a good idea to mix CSS with HTML. You should always keep these separate, but considering the fact that this technology is kind of new and everyone is still trying to figure out where to go with it. We'll just let it slide for now. Then there's performance. And here, we're doing pretty good. The technique speeds up the page. It doesn't load unnecessary images, so that’s very good. Finally, there is the browser support. And unfortunately, our dreams of finding the perfect solution are kind of shattered. As we can see from this table, support is limited for both the picture element and the source set attribute. They are only available in some modern versions of Chrome, Firefox and Opera. If you need to support Internet Explorer, bad luck. So, it seems for the time being we're stuck with a handful of browsers. But what if you love this technology so much that you want to use it in unsupporting browsers no matter what? Well, if you wanna do that, there's always the polyfill solution. So next up, let's talk about that.