Webpositive user-agent string

I thought about submitting this as a bugtrack item, but I’m not sure that it is one. I love Webpositive for its browsing experience. It’s just excellent, and has never crashed for me. “Great work” goes out to the development crew! I pointed it to various test sites, to check such things as HTML5 compliance, javascript, speed, etc. Webpositive does OK in all those tests, with the exception that the test sites usually think it is Google Chrome that I am using, when I am really using Webpositive. This is obviously based upon the user-agent string Webpositive generates. Now, maybe that is the intent? The string that comes out of Webpositive is:

Mozilla/5.0 (compatible; U; Webpositive/533.4; Haiku) AppleWebkit/533.4 (KHTML, like gecko) Chrome/5.0.375.55 Safari/533.4

Safari identifies itself (generally) as something like:

Mozilla/5.0 (McIntosh; U; OS-X; en) AppleWebkit/533.4 (KHTML, like gecko) Safari/533.4

Chrome identifies as something like:

Mozilla/5.0 (Windows NT 5.0) AppleWebkit/533.4 (KHTML, like gecko) Chrome/22.0.375.12 Safari/533.4

Firefox as:

Mozilla/5.0 (Windows NT 6.1) Gecko/20120716 Firefox/15.0

Why is the “Chrome” identifier included in WebPositive? I think that Google Chrome wants to be seen as either firefox/gecko or safari, if it is not recognized on its own merit. Being seen as Safari is probably a more reliable way for sites to see the “Webkit” rendering, and handle it appropriately. Being associated with gecko/firefox may grant entry to firefox friendly sites. Safari is trying to sneak in as gecko/firefox. What does Webpositive want to do? Those other browser user-agent strings are created by inserting the name of the browser at the end, or near to it, depending upon how they want to be perceived.

Maybe a good string for Webpositive would be:

Mozilla/5.0 (compatible; U; Haiku) AppleWebkit/533.4 (KHTML, like gecko) Webpositive/533.4;

That is clean - like firefox.

I think WebPositive should carve out a niche, and be itself. Or … let the user change the user-agent string …

The user-agent strings that eminate from some browsers require meta-physical powers to decipher. In the old days, the first thing after the “Mozilla/[version]” was “([system and browser info]) ([rendering platform]) extension” … but recent user-agent strings demolish that formatting idea pretty thoroughly. The www consortium should have created a new RFC on this issue (the original RFC is lame/incomplete), but all they want to do is complicate the scene beyond belief with “accessibility” issues. Truthfully, if sites cannot adequately identify browsers, it will reduce the user experience because idiosyncracies will not be properly taken into account …

I always liked the way Opera handled this issue. They defaulted to “honest” mode, where the user agent string indicated the real browser, and only the real browser. Then, in the configuration, the user could select from various options, such as “let me pretend to be Internet Explorer,” or “let me pretend to be Firefox,” etc. In this way, users could navigate to problem sites with a sort of masqueraded browsing, but not be asked to hand code any user-agent strings (which would create more problems than would be fixed) …

Really, the more I think about it …

Maybe WebPositive should represent itself as Google Chrome. Really, when a no-name, Webkit based browser’s user-agent string is evaluated by a site server, the only really useful information comes from the AppleWebkit (rendering engine) portion of the user-agent identifier. I’m guessing that many sites are not really set up to do that! So, NEVER MIND about this whole thread - probably the devs had this correct to start with … and are right to put a lean in the ID that points towards Chrome or Safari …

Opera was not really a no-name browser when they allowed for a selection of user agents within the configuration. So, at that point in time, Opera could probably get away with being absolutely honest about the identification …

I don’t really know if we thought about it that much, and I can’t even remember if that current user-agent string was something I or Stephan came up with. I’d be fine with simplifying it to be like yours (being honest about what browser we are), and then adding an option to customize it (maybe with a few examples from modern browsers.)

Overall though, sniffing the browser user-agent is an out-of-date technique, and there are plenty of better ways to determine a browser’s compatibility. But I’m sure it is still done a fair amount.

Eventually (which realistically may be a few years) I’d like WebPositive to fully support everything that WebKit supports, so that really it shouldn’t matter if it pretends to be Chrome or Safari, as it will be as compatible. Having used both of those browsers on Mac OS X, I generally prefer Chrome and feel it better implements various things. If there is any browser I most want to copy in WebPositive it would be Chrome (though honestly the latest Firefox does a few things better in my experience, and I’ll copy there where it makes sense.) I think if Haiku has a philosophy it would be to take the best from other systems and innovate where we can, while building off the great BeOS foundation. I hope to do the same with the browser, even preserving what we can of NetPositive (the Haiku error messages are on my list :wink:

I just came back from vacations and don’t have acces to my haiku machine right now, in the last webkit update the user agent string was updated from a hardcoded one to one that gets the applewebkit version from the sources, i also slightly modified it to be more haiku specific while trying to follow the “documentation”. Please have a look at the user agent string as produced by the latest WebPositive version found in the haiku nightly releases.

Thanks for the feedback. That’s the nice thing about Haiku - the developers take the time to read user forums. Most other OS development squads can’t be contacted through developer channels! Anyway - I pray I’m not riling up the water for no reason. There’s the old cliche - if it ain’t broke …

I’d hate to be the guy responsible for people getting pushed off websites … :slight_smile: