3 ms·
That User-Agent isn't really valid. It's the "like Gecko". If you only read the BNF, then okay, it's valid. But the various sections are supposed to have seman
by deathanatos 13y ago
That User-Agent isn't really valid.
It's the "like Gecko". If you only read the BNF, then okay, it's valid. But the various sections are supposed to have semantic meaning — they're supposed to be products with optional versions and comments. Like,
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0)
Means the product "Mozilla" with version "5.0", followed by a comment of "Windows NT 6.3; Trident/7.0; rv 11.0". Thus their UA of…
Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko
…includes the products "Mozilla", "like" and "Gecko".
Like the article mentions, "like Gecko" has been done before:
> Safari was the first browser to add “like Gecko” so that anyone sniffing for “Gecko” in the user-agent string would allow the browser through.
And they put it in a comment, not as two separate products:
> AppleWebKit/536.26 (KHTML, like Gecko)
See http://www.ietf.org/rfc/rfc2616.txt http://www.ietf.org/rfc/rfc2616.txt.