WebView identifies as Edge on some PCs, as IE11 on others - windows

We have a native app for Windows 64 bit. It embeds WebView (the original, not WebView2).
We set compatibility mode to IE11 with the BROWSER_FEATURE_EMULATION registry setting to 11000.
On some PCs, it identifies as IE11 with this user agent:
Mozilla/5.0 (Windows NT 6.2; Win64; x64; Trident/7.0; rv:11.0) like Gecko
On others, it identies as Edge with this agent:
Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.9200
These are all Windows 10 PCs, either 20H2 or 21H2.
How does this happen?
This is important because some things do not work in the "IE11" whereas they do work in the "Edge" mode. (Google maps)
From what I read, WebView on Windows 10 should always be "Edge IE11 mode".

Related

bodyScrollEnd event is not getting triggered in windows OS chrome browser on 125% scaling [ag-grid-vue]

Environment to reproduce
Windows 8,10,11
"vue": "2.5.16"
"ag-grid": "18.1.2"
"ag-grid-vue": "26.2.0"
Browser:
Chrome 96.0.4 +
Providing a Reproducible Scenario
Set the windows display resolution to scale to 125% or 150% Open the
chrome and open the app
https://codesandbox.io/s/ag-grid-vue-example-forked-gy47e?file=/src/App.vue
Now try to scroll to bottom of the grid bodyScrollEnd is not
triggering when scroll reaches the end
CodeSandBox link: https://codesandbox.io/s/ag-grid-vue-example-forked-gy47e?file=/src/App.vue
Current behavior
bodyScrollEnd event is working fine on MacOS BigSur(11.6) and Windows (on 100% scaling) on every browser
Expected behavior
bodyScrollEnd event should be triggered on reaching end or scroll irrespective of OS and browser
AG Grid version: 18.1.2
Browser:
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36'
Language: [ES6/7]

Microsoft teams user agent

Anyone know the name of user agent used by Microsoft Teams to parsing website ?
A customer put a link of my website on his microsoft teams but link is not rendering correctly because is not redirect to my prerender.
On 13 January 2022, the User-Agent strings of the browser used to render Teams Tab content were as follows (running in a small sample of various contexts):
Microsoft Teams (work or school) desktop app my x64 Windows 11 machine:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.4.00.32771 Chrome/85.0.4183.121 Electron/10.4.7 Safari/537.36
Teams Android App:
Mozilla/5.0 (Linux; Android 11; M2102J20SG Build/RKQ1.200826.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.70 Mobile Safari/537.36 TeamsMobile-Android
Teams Web App running in Chrome 97 on Windows:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
I got these by creating a simple tab app that loaded the content URL https://www.httpbin.org/headers, which is a public service that just echoes the request headers in the response, then navigating to that Tab in Teams in the various contexts above.
Long story short: As is often the case with user-agent sniffing, it doesn't seem sensible here to depend on the user agent string in your application in any way, because it varies quite a lot depending on the Teams context from which the request is made. Even if you were to try to match "Teams" or "TeamsMobile" for the "app" cases, it doesn't seem documented anywhere and Microsoft could well change it in future. So, my suggestion is to forget about the Microsoft Teams user agent.
I also had this question because I wanted to block link unfurling from MS Teams for an app I was developing.
I used the following line from in a Flask app
request.user_agent.string
To get this user agent
Mozilla/5.0 (Windows NT 6.1; WOW64) SkypeUriPreview Preview/0.5
This was January 2020 so it may change over time, FYI
I suggest you can find it easily. Develop a tiny website to record user-agent of all requests. Post the url of your website in teams. Then you can find it in the recorded user-agents.

How to get Microsoft Teams context property hostClientType

I've been trying to get hostClientType from Teams context. I get context with the code below, but hostClientType is not populated / available. I need to distinguish between running in teams webapp or teams desktop app and think the property is therefore. Any help is appreciated.
microsoftTeams.getContext(function (context) {
alert(context.hostClientType) // undefined
})
It's not in the object that .getContext returns.
Try navigator.userAgent - it will return something like: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Teams/1.1.00.22163 Chrome/61.0.3163.100 Electron/2.0.4 Safari/537.36".

Firefox Add-On, change preferences depending on connection

I would like to create my own Add-On that changes preferences depending on the proxy (if a proxy is being used or not), is that possible? I asked in a Firefox Add-On IRC but didn't a response, all users were idle.
Example:
// If proxy is enabled
lockPref("general.appname.override", "Netscape");
lockPref("general.appversion.override", "5.0 (Windows)");
lockPref("general.buildID.override", "20100101");
lockPref("general.oscpu.override", "Windows NT 6.1; Win32");
lockPref("general.platform.override", "Win32");
lockPref("general.productsub.override", "20100101");
lockPref("general.useragent.locale", "en-US");
lockPref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Firefox/31.0");

What is the user agent string for facebook app from android

What is the user-agent string added when we open facebook app from an android mobile. I want to detect facebook app from android OS using user-agent string, is that achievable. Are there unique user-agent strings for different devices for facebook app
Obligatory disclaimer: user-agent strings are usually the wrong answer. They change, they're inconsistent, it's a brittle way to detect anything.
That said, testing on a Samsung Galaxy S5, with a freshly installed FB app as of today, I got:
Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/35.0.0.48.273;]
The parts with 'FB' specifially seem to be Facebook information. I'd guess that:
FB_IAB: Facebook In-App Browser (followed by a version)
FBAV: Facebook App Version (followed by a version)
The FBAV is shared with the iOS user-agent string as found here: http://mpulp.mobi/2012/01/funky-user-agent-on-facebook-iphone-app/
Mozilla/5.0 (Linux; Android 7.1.1; Build/LMY47O.H18; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.83 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/127.0.0.22.69;]
Mozilla/5.0 (Linux; Android 7.0; SM-G930F Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.83 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/127.0.0.22.69;]
Mozilla/5.0 (Linux; Android 7.0; MHA-L29 Build/HUAWEIMHA-L29; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.83 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/127.0.0.22.69;]
Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Mobile/14F89 [FBAN/FBIOS;FBAV/96.0.0.45.70;FBBV/60548545;FBDV/iPhone7,2;FBMD/iPhone;FBSN/iOS;FBSV/10.3.2;FBSS/2;FBCR/E-Plus;FBID/phone;FBLC/de_DE;FBOP/5;FBRV/0]
Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X) AppleWebKit/602.3.12 (KHTML, like Gecko) Mobile/14C92 [FBAN/FBIOS;FBAV/90.0.0.51.69;FBBV/56254015;FBDV/iPhone6,2;FBMD/iPhone;FBSN/iOS;FBSV/10.2;FBSS/2;FBCR/1&1;FBID/phone;FBLC/de_DE;FBOP/5;FBRV/0]
Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_2 like Mac OS X) AppleWebKit/603.2.4 (KHTML, like Gecko) Mobile/14F89 [FBAN/FBIOS;FBAV/96.0.0.45.70;FBBV/60548545;FBDV/iPhone8,1;FBMD/iPhone;FBSN/iOS;FBSV/10.3.2;FBSS/2;FBCR/o2-de;FBID/phone;FBLC/de_DE;FBOP/5;FBRV/0]
Mozilla/5.0 (Linux; Android 4.4.4; G7-L01 Build/HuaweiG7-L01) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 [FB_IAB/MESSENGER;FBAV/121.0.0.15.70;]
Reference

Resources