Posted:
Posted by Eric Willigers, Software Engineer and Animations Acrobat

The newest Chrome Beta channel release includes new JavaScript language features, security improvements, and a large number of API tweaks. Unless otherwise noted, changes described below apply to Chrome for Android, Windows, Mac, Linux, and Chrome OS.

Animating objects along author specified paths

Previously, animating objects along an author-specified path required complex javascript code that could block important events like rendering and input. Developers can now animate any graphical object along an arbitrary path declaratively as a CSS property, allowing simpler code that doesn’t block rendering or input.

video
Complex animations using CSS

Optimized image loading and service worker instrumentation

Tools like srcset allow developers to serve an optimized image variant in a responsive way, but it can be cumbersome and inefficient to use in practice. Developers can now negotiate with the server to download the best image variant for a device using straightforward HTTP request headers. These headers communicate DPR, Viewport-Width, and the intended display width of the resource being fetched to the server.

In addition to improving image loading, developers can now instrument service workers to gather detailed fetch and script timing. Developers can also measure the startup time of service workers more accurately.

Other updates in this release


Posted by Eric Willigers, Software Engineer and Animations Acrobat

Posted:
Posted by Yusuf Ozuysal, Chief Tab Customizer

Android app developers face a difficult tradeoff when it comes to showing web content in their Android app. Opening links in the browser is familiar for users and easy to implement, but results in a heavy-weight transition between the app and the web. You can get more granular control by building a custom browsing experience on top of Android’s WebView, but at the cost of more technical complexity and an unfamiliar browsing experience for users. A new feature in the most recent version of Chrome called custom tabs addresses this tradeoff by allowing an app to customize how Chrome looks and feels, making the transition from app to web content fast and seamless.
Chrome custom tabs with pre-loading vs. Chrome and WebView

Chrome custom tabs allow an app to provide a fast, integrated, and familiar web experience for users. Custom tabs are optimized to load faster than WebViews and traditional methods of launching Chrome. Apps can pre-load pages in the background so they appear to load nearly instantly when the user navigates to them. Apps can also customize the look and feel of Chrome to match their app by changing the toolbar color, adjusting the transition animations, and even adding custom actions to the toolbar so users can perform app-specific actions directly from the custom tab.

Custom tabs benefit from Chrome’s advanced security features, including its multi-process architecture and robust permissions model. They use the same cookie jar as Chrome, allowing a familiar browsing experience while keeping users’ information safe. For example, if a user has signed in to a website in Chrome, they will also be signed in if they visit the same site in a custom tab. Other features that help users browse the web, like saved passwords, autofill, Tap to Search, and Sync, are also available in custom tabs.

Custom tabs are easy for developers to integrate into their app by tweaking a few parameters of their existing VIEW intents. Basic integrations require only a few extra lines of code, and a support library makes more complex integrations easy to accomplish, too. Since custom tabs is a feature of Chrome, it’s available on any version of Android where recent versions of Chrome are available. 

Users will begin to experience custom tabs in the coming weeks in Feedly, The Guardian, Medium, Player.fm, Skyscanner, Stack Overflow, Tumblr, and Twitter, with more coming soon. To get started integrating custom tabs into your own application, check out the developer guide.

Posted:
A good frame rate is important to maintain a fast browsing experience. A few months ago, Chrome added a scheduler, a new under-the-hood feature that places tasks in the idle time between rendering frames to help hit 60 frames per second. Chrome’s frame rate can be reduced by Javascript timers executing at the wrong time, making them a natural next candidate to optimize with the scheduler. The most recent version of Chrome beta reschedules Javascript timers to create a smoother experience when the user is interacting with a page.

Javascript timers enable web developers to write code that checks in on a page periodically with APIs like setTimeout. Advanced developers can use setTimeout to schedule their code at opportune times, but they often don't have enough information to schedule it optimally. A timer’s function is placed into the main execution queue, meaning that if the function is run at the wrong time, it could block time-critical work that shares the queue, like input or rendering. Chrome has signals that important work is incoming, but before M45 they were ignored for timers.

When the user taps the page, they often interact with it again immediately or Chrome needs to re-render part of the screen. The scheduler now delays impending expensive timers after a tap in anticipation of these tasks, allowing many web pages to be scheduled more efficiently. In practice, this can result in up to a 50% input latency improvement on websites that use timers heavily.

The latest version of Chrome scrolling a timer heavy site with no optimizations (left) and delayed timer execution (right).

Scheduling timers intelligently is just one use of the scheduler’s infrastructure. To keep improving, Chrome will continue integrating the scheduler with more rendering engine tasks. Using cycles wisely is one way to keep the web fast for everyone.

Posted by Alex Clarke, Software Engineer and Timer Tamer

Posted:
Unwanted and deceptively installed extensions are a leading cause of user complaints, and over the last few years we’ve taken several steps to address the problem. Today we’re taking another step in our ongoing effort to protect Chrome users: disabling inline installation for extensions linked to deceptive sites and ads.

Inline installation was introduced in 2011 as a way for users to seamlessly install extensions from developers’ websites. Unfortunately, this mechanism has been abused by deceptive sites and ads that trick users into installing unwanted extensions.  

This ad appears to be a software update but actually links to an inline installation site for a Chrome extension.

To help address this problem, on September 3 we’ll begin disabling inline installation for extensions that employ these deceptive tactics. For these extensions, inline installation attempts will be redirected to the extension’s product details page in the Chrome Web Store, allowing the user to make an informed decision about whether to install.  

Although less than 0.2% of all extensions will be affected by this change, it’s an important step to maintain a healthy extension ecosystem for users and the vast majority of extension developers who don’t use deceptive tactics. If you have any questions regarding this change, please reach out to us at chromewebstore-policy@google.com.

Posted by Andrew Kim and Ben Ackerman, Chrome Policy and Anti-Abuse Team

Posted:
The newest Chrome Beta channel release includes new JavaScript language features, an improved audio experience on Android, and a large number of minor API improvements and deprecations. Unless otherwise noted, changes described below apply to Chrome for Android, Windows, Mac, Linux, and Chrome OS.

New ES2015 features

Over the past year Chrome has shipped a number of new JavaScript features defined in the ES2015 specification (formerly known as ES6), a major update to JavaScript that allows developers to write application logic that is easier to read, more powerful, and more memory efficient than ever before.


Service worker improvements

Chrome 40 introduced support for service workers, enabling developers to build high performance sites that work offline. This release includes a number of improvements:




Finally, in a breaking change, messages sent via Client.postMessage() now fire an event on navigator.serviceWorker instead of the window object.

Media controls in Android notifications

media-notification.png
Playback controls for currently-playing audio are shown in the notification tray and on the lock screen

On Android, native apps can show media controls in a system notification when playing audio, making it easy for users to control audio while multitasking. Chrome 45 brings this capability to the web by showing a notification with media controls when audio is playing in web content. The controls will automatically show up when <audio> or <video> tags play audio longer than 5 seconds.

Other updates in this release


Update: The User Timing and Resource Timing APIs are unfortunately not exposed to service workers in this release, but should be available in Chrome 46. 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 Andreas Rossberg, Software Engineer and ECMAScript Evangelizer