Many feature phones use Opera Mini to serve webpages. Similarly Kindle Fire uses Amazon Silk. Is there a way in JavaScript to detect that a proxy is being used without UA detection?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In Opera Mini's case: no. The JavaScript will in fact be executed by the "proxy server", not by the real client.
回答2:
My hypothesis is that such cloud based browsers cannot support a subset of events. For detecting such browsers I am using a javascript test that checks support for an event scroll
.
var cloudBrowser = ('onscroll' in window?false:true);
I was able to find this working successfully on opera mini on my android (Samsung Galaxy Note 2) and also on Nokia C2-03 browser. (I was unable to check this for Amazon Silk as I do not have the device).
Do let me know if you are aware of any other cloud browsers for android that I can download and extend the testing.