Thoughts on User-Agents The string is a stark data structure and everywhere it is passed there is much duplication of process. It is a perfect vehicle for hiding information. -Alan Perlis, EPIGRAMS IN PROGRAMMING #34 I so look forward to the death of the WWW, whose every mistake in design and more was anticipated by Xanadu. One of the more annoying aspects of the WWW, once one acclimates to the shitty environment, is that User-Agent header, a worthless header created solely to make tracking users easier and which of course fails multiple ways even at that purpose. The primary product of the header is allowing a corporation to harrass and deny users based on overly simplified rules. After giving this mechanism a bit more thought, I noticed a more general issue enabled solely by use of strings for such things. I'm firstly reminded of my thoughts on how only trivial extensions work, mostly feature negotiation. Probing for features is usually cited as better than matching against user-agent identifiers, and is feature negotiation effectively, but between programs which aren't peers; it halfheartedly resembles a capabilities system, but without enforcement, and programmers regularly find it simpler to use the features without any probing. While it also requires the concepts requested to exist clearly and as desired, feature negotiation is likely the best solution to this problem, if it can't be eliminated. One way in which feature detection differs from feature negotiation practically if not by definition is the clumsy way in which detection works: The interface is tested with requests that exist only to collect results for comparison with a set of expectations. It's more flexible, fragile, and exposed to strange interfaces that detect and interfere with such tests. Feature negotiation can be static. A user-agent identifier is only simple to implement, not to use usefully; it mixes feature detection and feature negotiation, and they always fall to historical circumstance. WWW browsers' user-agents include ``Mozilla'' because of stupid systems which searched for the substring unintelligently; I've noticed even the emulated terminal devices under UNIX suffer this issue, but with ``xterm'' instead. This problem of compatibility is solved by structure, exactly the dearth of which Perlis criticized. If compatibility with some existing system be necessary, it is, then programs should register theirs directly; a tree of compatibilities results from such a mechanism, and the question of compatibility becomes trivial without lies in identifiers. It would be better to register compatibility with some abstract entity, instead of a particular program, and such an entity could be called a ``standard''. In BitTorrent, I believe user-agent identifiers to be rather meaningless on purpose, and they appear to be used primarily for discrimination. Such identifiers are worse than worthless, and the ease of imitation invites various subtle probes for lying then expulsion from a swarm or tracker. Gopher is a system too simple to support a user-agent identifier, and I know of no one who dearly misses them. A lot of trouble results from stuffing octets into a variable rather than seriously thinking about a series of systems that enable what the octets supposedly can. It's certainly easier to ignore this. I only can find it best to design a system which benefits not from such identifiers, and lacks them. .