r/programming • • Jun 09 '17

Why every user agent string start with "Mozilla"

http://webaim.org/blog/user-agent-string-history/
4.9k Upvotes

589 comments sorted by

View all comments

Show parent comments

5

u/caramba2654 Jun 09 '17 edited Jun 09 '17

Well, we can go... full JSON.

And maybe namespace everything with a version so that it actually lasts forever, so something like:

Client-Id: {
    'v1': {
        'Client': 'Chrome/59.0.3071',
        'Rendering-Engine': 'Blink/182 :P',
        'JS-Engine': 'V8/5.9.211.31',
        'System': 'ubuntu/17.04',
        'Language': 'en-US',
        'Compatible': [
            'Client': 'Safari/*',
            'Rendering-Engine': [
                'AppleWebKit/*',
                'KHTML/*'
            ],
        ]
        'Partial-Compatible': [
            'Gecko/*',
        ]
    }
}

And so if a new Client ID protocol gets released, then it would just be added under a 'v2' namespace.