[Webkit-unassigned] [Bug 12854] Allow FrameLoaderClient to override navigator.appVersion

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 22 15:03:23 PST 2007


------- Comment #4 from public at oscarc.net  2007-02-22 15:03 PDT -------
> If reason (1) is truly compelling, then I suggest having the user agent string
> change, and not just the appVersion. Early versions of WebKit did indeed use a
> different user agent on different websites, but after much reflection we
> decided this was not a scalable approach to site compatibility.
> As far as reason (2), if a browser wants to spoof and report different things
> to different websites, I recommend changing the user agent string rather than
> just changing appVersion.

Since the userAgent is already set by the client, any per-site compatibility
code can already modify the userAgent. For instance, if a particular site uses
ActiveX unless the userAgent and appVersion are FireFox, the client can modify
the userAgent but not the appVersion. This patch allows the client to modify
both if it so desires. Why tie the two together?

> I'd find this more convincing if someone said specifically that they wanted to
> use this in a particular version of WebKit and explained the benefits in a more
> concrete way.

For example, if you look at the browser detection code on eonline.com, it has
several problems. Last I tried it, it choked when it detected WebKit on Linux.
Also, it checks for specific strings. Since have a WebKit-based browser
returning "webkit safari" might be considered a trademark violation, the next
best thing is to masquerade as FireFox. 

> That's because as much as possible we want to all be in "the same boat" for
> compatibility. 

The client can already set appVersion indirectly (by modifying the UA), so
depending on the UA that is set, we all are already not in the same boat. Why
allow any UA string, but then force the appVersion to be a substring?

Also, what if the chosen UA string doesn't have a slash in it?

> Marking the local variable "ua" as const isn't really all that helpful,
> especially in a one-line, two-statement function, so I suggest leaving it off.

OK, thanks. If this change is OK'd I'll submit a modified patch.

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list