Thursday, February 27, 2014
The srcset attribute
Today the web is used on laptops, TVs, phones, tablets and other devices with heterogeneous screen sizes and device pixel ratios. Serving the same image resources to all devices can lead to slower page load times, wasted bandwidth and improperly formatted content.
srcset will help resolve this problem by letting Web developers provide multiple resources in varying resolutions for a single image. The browser can then pick the resource that matches the device's capabilities. Here’s an example of the code:
Note that the src attribute is not needed for browsers that support srcset, but it’s good for backwards compatibility. Kudos to external Blink developer Yoav Weiss for implementing and driving consensus for this feature. Stay tuned for the <picture> element, which will also help web developers with responsive design.
Unprefixed Web Audio
This brings Chrome’s implementation of Web Audio in alignment with the W3C draft specification and offers compatibility with the Web Audio support in Firefox. Please switch to the unprefixed versions soon, as the prefixed versions are now officially deprecated and will be removed in a future release.
UPDATE April, 9th: Unprefixed Web Audio will ship in Chrome 35, not Chrome 34.
Other web platform changes in this release
- The font-variant-ligatures CSS property allows developers to control ligatures in text.
- A variety of infrequently used web platform features have been deprecated or removed. For a complete list, see the list of Blink “intents”.
- As we’ve previously discussed, Chrome will now offer to remember and fill password fields in the presence of autocomplete=off. This change does not affect non-password fields.
As always, visit chromestatus.com/features for a complete overview of Chrome’s developer features, and circle +Google Chrome Developers for more frequent updates!
Posted by Raymond Toy, Software Engineer and Audiofile [sic]