Removing Legacy SPDY Protocol Support

This is a guest post from Apple’s CFNetwork team about changes to the URLSession networking framework used by Safari and WebKit on Apple platforms. These changes may affect compatibility with your websites.

SPDY is a network protocol designed to improve the performance of web browsing and other HTTP-based communication by addressing many limitations of the HTTP/1.1 protocol. Safari gained support for the SPDY protocol in 2014 with Apple’s OS X Yosemite and iOS 8 releases. This was achieved by adding SPDY support to the Foundation networking URLSession API.

Many components of the SPDY protocol proved to be successful improvements over HTTP/1.1, so the Internet Engineering Task Force (IETF) drafted a new protocol specification, HTTP/2, based on many of the same ideas, along with other improvements. Safari and URLSession added support for the HTTP/2 protocol in 2015 with Apple’s OS X El Capitan and iOS 9 releases.

Unlike HTTP/2 and HTTP/1.1, the SPDY protocol is not specified by an Internet standard from the IETF. Rather, it is an experimental protocol that served as a stepping stone to HTTP/2. In fact, many browsers and servers that supported SPDY quickly migrated to HTTP/2, and furthermore, have since dropped support for SPDY entirely (e.g., Chrome, Firefox, and Cloudflare).

Support for the legacy SPDY protocol is deprecated in the recently released Apple Developer Betas of macOS Mojave 10.14.4 and iOS 12.2. In an upcoming release, legacy SPDY protocol support will be completely removed from Safari along with Apple’s URLSession (and deprecated NSURLConnection) API. At the same time, support for the legacy NPN TLS Extension will be removed. NPN, which was added for SPDY, also was never standardized and has been replaced by ALPN.

Removing legacy SPDY protocol support will have little impact to many users of Safari and other applications using URLSession. Servers that did add support for SPDY continued to support HTTP/1.1, so connections to these servers will continue to work by gracefully switching to using HTTP/1.1 (if upgrades to add HTTP/2 support have not occurred), but may suffer from a loss of performance in doing so. To help identify any unexpected cases where SPDY is still being used, a new deprecation log message is generated by URLSession once per process launch if SPDY is negotiated with a server:

WARNING: URLSession (or NSURLConnection) is using SPDY protocol, which is deprecated and will be removed in a future release

This log message is available starting in the Apple Developer Betas of macOS Mojave 10.14.4 and iOS 12.2 and will be found in the system log.

For many, removal of legacy SPDY support requires no action, as the URLSession API will automatically switch to the best protocol available. However, if you own or operate a web server that still supports the SPDY and/or NPN experimental technologies, we encourage upgrading to HTTP/2 now so that your clients can take advantage of its many benefits. If you have any systems which prevent transitioning from SPDY to HTTP/2, please let us know by contacting our Web Technologies Evangelist or by filing a bug report with details.