Project

General

Profile

Actions

Feature #169

closed

Mobile identification for Privacy Browser User Agent

Added by Brian Toole almost 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Next Release
Start date:
07/07/2017
Due date:
% Done:

0%

Estimated time:

Description

Is it possible to modify the Privacy Browser user agent to identify as a mobile browser rather than a desktop one? I don't know enough about what information gets sent behind the scenes in any given user agent, but it would be great if the Privacy Browser agent could be modified to allow for just a mobile identifier (or perhaps add a Privacy Browser (Mobile) user agent that sends slightly more information than the standard Privacy Browser agent does. Created this as a feature, although I don't know if a bug would be a better label for it.

Actions #1

Updated by Soren Stoutner almost 7 years ago

  • Status changed from New to Closed
  • Assignee set to Soren Stoutner

It would be nice if there was a flag that could be set in the user agent to tell websites we would like the mobile version. Unfortunately, it doesn't work that way (detailed information below).

1. The full text of the user agent is visible in the settings in Privacy Browser. For example, the default is `PrivacyBrowser/1.0`, which is designed to disclose a minimum of information about the device to the web server. Setting `WebView Default` on my device currently sends `Mozilla/5.0 (Linux; Android 7.1.2; Nexus 6P Build/N2G47W; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/59.0.3071.125 Mobile Safari/537.36`, which changes over time because it lists the currently installed version of `WebView` (after `Chrome/`) as well as listing the version of Android, the model of the hardware, and the build number of the OS.

2. Some web servers only have one version of a webpage. Some have multiple and choose which one to give out to a browser based on a number of factors that the web programmer has specified.

3. Web servers can present different version of a webpage for desktops, for mobile, for different languages, for different browsers (like having a separate version for Internet Explorer), for different regions of the worlds, or for any other reason that they choose.

4. Web servers can decide which version of a webpage to send to the browser based on a number of factors, including the user agent, the size of the screen, the size of the window, the IP address the request is coming from, etc.

5. Most web servers that have a mobile version maintain a list of known mobile user agents. If the requesting browser sends one of those user agents it gets the mobile version. If it sends any other user agent, it gets the desktop version.

6. Web servers don't have to use the user agent at all to make this determination. For instance, they could just use screen size to make the determination and ignore the user agent entirely.

7. There are lots of examples of web pages getting things wrong, and sending the wrong webpage to a device. This often happens if web server operators don't update the list of user agents often enough.

8. Often, when parsing user agents, web servers look for familiar patterns instead of an exact match. This cuts down on false results.

So the takeway from all of this is that if a web server is using the user agent to decide if it should send the mobile version of a site instead of the desktop version, selecting `WebView Default` is likely to work well for you. It has all the markers that web servers are looking for to identify a mobile device. That is why it is provided as the second option in the list. You can use domain settings to specify different user agents for different websites if you desire, so that some present the mobile version and others don't.

(You might also read over https://redmine.stoutner.com/issues/160, which describes a bug that caused user agent domain settings to not work if the site performed a redirect. This bug has been fixed and will be included in Privacy Browser 2.5.)

Actions #2

Updated by Soren Stoutner about 5 years ago

  • Priority changed from 2 to Next Release
Actions

Also available in: Atom PDF