How I can figure out if someone opens my website in windows 11?
I test user agent and when someone opens my website with windows 11 I will get this
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0"
So technically this says it's windows 10, not 11.
Is there any way to detect this?
The User-Agent tells the server what the visiting device is (among many other things) and this information can be used to determine what content to return. Of course this requires using a device detection solution which translates UAs into understandable software and hardware information.
Google Chrome Chrome's user agent switcher is part of its Developer Tools. Open them by clicking the menu button and selecting More Tools > Developer Tools. You can also use press Ctrl+Shift+I on your keyboard.
Using the User-Agent string to detect the browser and operating system is not reliable and is a legacy practice. You won't be able to detect Windows 11 because Windows 11 will use "Window NT 10.0" which is the same that Windows 10 uses.
But you can use User-Agent client hints in new browsers like Edge 94+ and Chrome 95+.
For Windows 11, look for these request headers:
Sec-CH-UA-Platform set to 'Windows'
Sec-CH-UA-Platform-Version set to 13.0.0 and above
See this link for more information: Detecting Windows 11 using User-Agent Client Hints
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With