Performance/Proxy browsers

From Wikitech
< Performance(Redirected from ProxyBrowsers)
Jump to navigation Jump to search

Proxy browsers are web browsers which use their own proxy server to send an optimized version of the page to the browser. The best-known example is Opera Mini.

Browser vs Proxy browser vs Remote browser

On mobile phones there are different kinds of web browsers. Why? Browser vendors try to minimize the content sent from the server and the browser to make pages load faster for users with a slow connection and a slow phone.

Standard (uncompressed) browser works as browsers do on desktops: It asks the origin server for the HTML page, and then fetches the assets (CSS, JS and images) from the origin server and renders the page on the mobile phone.

Proxy browser tries to be smart and minimize the content sent to the client but it makes sure not to break the pages for the user. The browser does the HTML request to a proxy server (provided by the browser vendor). The proxy server then does all the requests to the origin server, and then, before it sends the responses back to the client browser, it tries to minimize the content by adding compression, compressing images harder. It will not change the content, only will try to compress it harder.

Remote browser tries even more to minimize the content sent between the browser and the server. The client browser sends the request to the browser vendors proxy server, the proxy makes the requests to the origin server, the proxy server tweaks and generates the page on the server side and send a binary version to the remote browser (the rendering is happening on the server). The servers for Opera Mini execute Javascript but with a timeout for X seconds, so after X seconds, the HTML is sent to the browser (or rather the binary blob).

This browser definition is based on Tim Kadlecs blog post Understanding Proxy Browsers Architecture use it to get a deeper understanding.

Proxy/Remote Browsers

Lets go through the most used proxy/remote browsers.

Opera Mini

Opera Mini has a big user base in Africa and according to Opera they save a lot of money for the African users. You can configure mini to work as a proxy ('turbo mode') or as a remote browser ('Mini-mode' with the "Data Savings" options). When functioning on Mini-mode the rendering engine used is "Opera Presto"[1]

Documentation

Opera Mini has a good Web Content Authoring Guide that helps us understand how it works and what we need to do to make pages look good on Opera Mini.

User Agent

User Agent is documented by Opera at https://dev.opera.com/articles/opera-mini-content-authoring-guidelines/#ua-sniff

To know if it the browser is Opera mini you can search for the substring Opera Mini, to know if rendering was done on opera's servers you can search for Presto, the rendering engine.

It's a little harder to separate between "proxy" and "remote" browser.

Here's what it looks like out in the wild (2016-06-20):

# Opera Mini Android (Mini-mode) a.k.a remote
Opera/9.80 (Android; Opera Mini/16.0.2168/37.8603; U; en)
'''Presto/2.12.423 Version/12.16
'''
# Opera Mini iOS (Opera Turbo) a.k.a proxy
Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X)
AppleWebKit/601.1.46 (KHTML, like Gecko) OPiOS/14.0.0.104835
Mobile/13F69 Safari/9537.53

# Opera Mini iOS (Mini-mode) a.k.a remote
Opera/9.80 (iPhone; Opera Mini/14.0.0/37.8603; U; en)
'''Presto/2.12.423 Version/12.16
'''

UC mini

UC is big in India, they claim to have over 50% of the traffic and they are popular in other countries too.

Documentation

I haven't found any documentation for UC browser in English. There's a developer section on the site but only information about the user agent.

User Agent

User Agents for UC Browser and UC Browser Mini are documented at http://www.ucweb.com/download/UCBrowser_User_Agent_en.pdf

To know if UC Browser is used, look for the substring UCWEB or UCBrowser.

Here's what it looks like out in the wild (2016-06-20):

# UC Browser for iOS (proxy)
Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X; en-US)
AppleWebKit/537.51.1 (KHTML, like Gecko) Mobile/13F69
UCBrowser/10.7.2.795 Mobile

# UC Browser Mini for Android (remote) 
UCWEB/2.0 (MIDP-2.0; U; Adr 4.4.2; en-US; HUAWEI_Y360-U61)
U2/1.0.0 UCBrowser/10.7.5.785 U2/1.0.0 Mobile

Chrome

You can turn on "Data saver" in Chrome on Android (=proxy), but it will not change any content when you are on HTTPS (https://support.google.com/chrome/answer/2392284?hl=en) so it will not do anything for a user navigating Wikipedia.

Puffin

Documentation
User Agent
  1. https://appdevelopermagazine.com/1610/2014/6/30/What-Web-Developers-Need-to-Know-About-Opera-Mini-8-for-iOS/