Detect Windows 11
In our statistics we take the UserAgent-object, extract the operation system and log it. It turned out, that Windows 11 machines tell, that the operating system is "Windows 10". This was unexpected.
We have to get the real name of the client operating system. This seems to be not easy, as Firefox and Explorer don't support user agent hints (which seem to be needed).
Quote from a Microsoft resource: "User-Agent strings won't be updated to differentiate between Windows 11 and Windows 10, or to differentiate between CPU architectures. We don't recommend using User-Agent strings to retrieve user agent data. Browsers that don't support User-Agent Client Hints won't be able to differentiate between Windows 11 and Windows 10, or between CPU architectures."
See: https://learn.microsoft.com/en-us/microsoft-edge/web-platform/how-to-detect-win11#sample-code-for-detecting-windows-11
Where is this file located?
server side in project OpenRobertaRobot there is in class Statistics a method infoUserAgent, which needs instead of userAgent.getOperatingSystem().getName(), (which seemed for us to be simply correct, this was so until Win 11) a more detailed analysis of the data in UserAgend to detect the right os.