The appliance of science

Google has teamed up with academics in an effort to create a more systematic approach to web feature deprecation.

Deprecation involves publicly flagging a feature that has become obsolete or otherwise undesirable, warning developers that support for the technology will be removed in the near future.

Handled correctly, deprecation can help ease the transition away from a soon-to-be-dropped feature towards alternative technologies.

If handled badly, though, deprecation may result in frustration for both users and developers – developers might have to adapt their code, while users suffer due to resultant breakage or withdrawn support. Therefore, product maintainers must be careful in deciding how to carry it out.

Google has teamed up with computer scientists from the University of California, San Diego, to take a closer look at the practicalities of web feature deprecation, with particular reference to Chrome.

Six pack

Deprecation of APIs (or API behaviors) created by browsers (aka web features) happens for a variety of reasons.

Technologies need to be dropped if feature experiments fail, security problems arise, or new and better APIs are introduced, for example.

Broadly speaking, the reasons for deprecation in Chrome fall into six different categories: security flaws, updated specifications or standards, dropping an experimental web feature that was never standardized, cleaning up the user experience, sorting out buggy or inconsistent implementations, and exorcising technologies that have been removed from a specification or standard.

In 2014 there were 91 new features implemented in the Chrome browser – in 2015, that number had nearly doubled to 161.

While these new APIs spur innovation, feature removal is a necessary part of a healthy web ecosystem, in much the same way that pruning the branches of trees creates stronger and healthier plants over the long term.

Historically, Chrome deprecations have been driven by two data sources – user metrics analysis and the HTTP Archive.

The HTTP Archive is a public dataset that tracks how the widely visited sites on the internet are implemented, including whether a particular website uses a specific web feature.

Google and researchers from the university argue that basing decisions on these sources are not always effective.

For example, in 2017 Chrome decided to disallow videos from auto-playing with audio on web pages, in order to stop advertisements from being automatically served.

However, this change also affected internet-based games that relied on the auto-play functionality to work, breaking the games as a result.

The impact was so severe that the Chrome team were obliged to postpone deprecating auto-play.

This incident also resulted in a public outcry that risked alienating a portion of Chrome’s userbase – something Google is obviously keen to avoid, hence the drive to find a better way through the appliance of science.

Running the numbers

In the recent study, Google classified two and a half years of web feature deprecations in Chrome. Its empirical analysis revealed that different categories of features should be treated independently.

The exercise looked at various metrics related to deprecated web features and grappled with the challenges faced during the process.

It found that competing interests are at play. A key challenge in deprecating features is balancing the costs to developers in continuing to support legacy technologies with the impact on users and progress on the web.

Many browsers already have procedures and protocols in place to ensure that a deprecation does not cause too much pain, typically based on usage metrics.

Google has now come up with a new set of guidelines for deciding when it is safe to deprecate, plus an accompanying tool for determining whether a web feature meets these guidelines.

The work is summarized in a white paper entitled “Web Feature Deprecation: A Case Study for Chrome” (pdf). The research was presented last month's International Conference for Software Engineering, Software Engineering in Practice (ICSE SEIP) in Montreal, Canada.

Ariana Mirian, a PhD student at the University of California, San Diego, and co-author of the paper, told The Daily Swig that the research had application beyond the field of browser development.

“In the paper, we do discuss how this methodology could be generalized to other areas of software engineering as well,” Mirian explained. “I could see it being useful for other browsers, though I’m sure each browser will run into their own trials with setting up this data driven pipeline for web feature deprecation.”

“In terms of general lessons, we found that a metric or two isn’t enough to paint the entire picture of a web feature deprecation. Instead, we needed to think about what we were trying to measure (user pain and developer pain) and how we could expand our insights using data to see more of the picture; this aspect of the project is also generalizable to other areas,” she added.

RELATED Google Chrome bans cryptomining extensions