Blog

How Locale Tokens Disappeared From User Agents

Older user agent strings frequently contained a language and region code inside the platform comment. Its removal is a clean example of a field leaving the header for a better channel.

Locale was in the string for content selection

Sites serving multiple languages needed to choose one before rendering. The locale token gave them a value to branch on that arrived with the request.

It typically encoded a language and a region, matching the browser's interface language rather than any explicit user preference about content.

That distinction mattered more than it appeared. Interface language and preferred reading language diverge often, particularly for multilingual users.

A dedicated header already did the job better

HTTP defines a language preference header carrying an ordered list with weights. It expresses fallback preferences that a single locale token cannot.

Because it is a list, a server can match against what it actually offers rather than making a binary decision on one code. This is the mechanism content negotiation was designed around.

With a purpose-built header available, the locale token in the user agent was redundant. Two sources for one fact is a liability, not a convenience.

The token distinguished users unusually well

Locale narrows a population sharply, especially for less common language and region combinations. Combined with platform and version, it made requests noticeably more distinguishable.

That made it an early candidate for removal once vendors began reducing what the header exposes by default. The cost was high and the benefit duplicated.

Notably, the dedicated language header carries similar information. The difference is that it is a stated preference with a defined purpose rather than an incidental disclosure.

Removal was gradual and uneven

Vendors dropped the token at different times, and some builds retained it for particular platforms after removing it elsewhere. Logs from the transition show both shapes.

Code depending on it degraded quietly. A missing token usually meant falling through to a default language rather than producing an error anyone would notice.

Sites that had never implemented the standard language header discovered the gap only when users reported receiving the wrong language.

The pattern repeats for other fields

Locale set the template for later reductions: a field leaves the user agent when a dedicated channel exists and the field distinguishes users more than it helps sites.

Device and platform detail are moving along the same path, into fields a site requests rather than receives by default.

Anyone still parsing the user agent for something a dedicated header provides should expect that value to disappear. The dedicated channel is the durable source in every case where one exists.