Hi Yuvi,
On Thu, Mar 27, 2014 at 03:30:24AM +0530, Yuvi Panda wrote:
On Thu, Mar 27, 2014 at 3:20 AM, Yuvi Panda
<yuvipanda(a)gmail.com> wrote:
> How about:
>
> WikipediaApp/<version> <OS>/<form-factor>/<version>
TL;DR: Looks good. But what about either of
WikipediaApp/<version> (<OS> <version>; <form-factor>)
WikipediaApp/<version> (<OS>; <version>; <form-factor>)
WikipediaApp/<version> (<OS>/<version>; <form-factor>)
?
They would more closely reflect both the User-Agents in the wild and
also RFC 2616 [1].
------------------------------------------------------------
According to RFC 2616's approach to formalize User-Agents [2],
your proposed variant would be two “product” [3] tokens.
While the RFC does not forbid doing so, I'd argue that the OS part
would better fit a “comment” [4] token.
Firstly, there is RFC's interpretation of using subproducts
(2nd, 3rd, ... product) for User-Agent header:
[...] and any subproducts which form a significant part of the user
agent.
I do not think that the OS forms a significant /part/ of the user
agent. Rather the user agent runs on top of the OS (and might well be
specific to the OS). So for me, the RFC imposed metaphor does not work
too nicely for the original suggested User-Agent.
Secondly (and that is more relevant), typical existing User-Agents
also put OS information into “comment” tokens. Some random examples:
Mozilla/5.0 (Windows NT 6.1; WOW64)
Mozilla/5.0 (Linux; Android 4.3; en-gb; SAMSUNG GT-I9505 Build/JSS15J)
Opera/9.80 (Windows NT 5.1; U; ru)
Dalvik/1.4.0 (Linux; U; Android 2.3.6; GT-S5360 Build/GINGERBREAD)
Articles/295 (iPhone; iOS 7.0.4; Scale/2.00)
So I'd put the OS part into a comment token like:
WikipediaApp/<version> (<OS>/<form-factor>/<version>)
But I am not sure about the order and separators in
“<OS>/<form-factor>/<version>”.
If “<version>” refers to the version of the “<OS>” I guess it
should go with the “<OS>” and not be separated by “<form-factor>”.
Whether it'd be
<OS>/<version>
<OS> <version>
<OS>; <version>
depends mostly on what you want to convey. The slash variant is closer
to the “product” token of the RFC but the RFC does not require to use
“product” tokens within a “comment” token. In fact, all of the above
three variants can be found in the wild (compare the “comment” token
in the above examples)
Regardless how one models the “<OS>” and “<version>”, I would not
separate it from “<form-factor>” by a slash. While I could not find it
in the RFC, use in the wild pretty much everywhere uses semi-colons to
separate different parts of the “comment” token (see examples above).
Hence, from my point of view any of
WikipediaApp/<version> (<OS> <version>; <form-factor>)
WikipediaApp/<version> (<OS>; <version>; <form-factor>)
WikipediaApp/<version> (<OS>/<version>; <form-factor>)
would more closely reflect both the User-Agents in the wild and also RFC
2616.
Have fun,
Christian
[1]
http://tools.ietf.org/html/rfc2616
[2]
http://tools.ietf.org/html/rfc2616#section-14.43
[3]
http://tools.ietf.org/html/rfc2616#section-3.8
[4] Search for "Comments can be included" on
http://tools.ietf.org/html/rfc2616#page-17
to find the definition.
--
---- quelltextlich e.U. ---- \\ ---- Christian Aistleitner ----
Companies' registry: 360296y in Linz
Christian Aistleitner
Gruendbergstrasze 65a Email: christian(a)quelltextlich.at
4040 Linz, Austria Phone: +43 732 / 26 95 63
Fax: +43 732 / 26 95 63
Homepage:
http://quelltextlich.at/
---------------------------------------------------------------