browsersays

navigator.userAgent

The self-description string your browser sends with every request and hands to every script. What is in it, why it is mostly fiction, and how to read it.

Checking the browser you are reading this in…

Entry in question 1: What your browser calls itself

What it is

The user agent is one long string your browser wrote about itself before it ever met the site reading it. It is sent as an HTTP header on every request and it is also readable by any script on the page, which means a site has it twice over before you have clicked anything.

What a site can do with it

A site uses it to guess your browser, your rendering engine and your operating system family. Almost every word in it is a historical accident kept for compatibility, so its real value to a site is not the truth it carries but the exact shape of it: two browsers of the same version on the same platform produce a character-for-character identical string, and anything that does not match a known shape is immediately interesting.

Check it yourself

Open your browser's developer tools, go to the console, and paste this. Nothing is sent anywhere; the answer comes from the browser you are reading this in.

navigator.userAgent

The full path recorded by the walk is navigator.userAgent, and that is the string the leaflet prints beside this entry.

What the answer is on an ordinary browser

Written by hand for each of the three engines, because a table generated from one sentence would be worth nothing to the person reading it.

Chrome
A long string beginning "Mozilla/5.0" and containing both "Chrome/" and "Safari/", with a version number that in recent releases reports the minor digits as zeros.
Firefox
A shorter string containing "Gecko/" and "Firefox/", with no "Chrome" and no "Safari" in it.
Safari
Contains "Version/" followed by "Safari/" and no "Chrome/". On iPhone and iPad every browser reports a Safari-shaped string, because they all use the same engine.

If your browser is not present, the leaflet prints this instead of dimming the line: Not present. A browser with no user agent at all would be extraordinary.

Where it sits in the leaflet

This is one of 9 entries in question 1, what your browser calls itself. The leaflet reads all 42 entries in one press and prints each answer beside the question, with the property name next to it so you can check any line.

Read my browser · navigator.login · navigator.userAgentData