Comments (3)
I am not sure if there is a way to detect Windows 11 at the server level (yet). Based on my Microsoft, we can detect Windows 11 from with JavaScript (see code below). I tweaked their code to send the version to the server via AJAX (as a POST method). It has been working fine for for me.
navigator.userAgentData.getHighEntropyValues(["platformVersion"])
.then(ua => {
if (navigator.userAgentData.platform === "Windows") {
const majorPlatformVersion = parseInt(ua.platformVersion.split('.')[0]);
if (majorPlatformVersion >= 13) {
console.log("Windows 11 or later");
}
else if (majorPlatformVersion > 0) {
console.log("Windows 10");
}
else {
console.log("Before Windows 10");
}
}
else {
console.log("Not running on Windows");
}
});
If someone has a better approach via PHP, please share.
from agent.
$version = $agent->version($platform);
it is 10.0, but my computer is windows 11
Same issue.
from agent.
thianks ,I also use this
from agent.
Related Issues (20)
- Not working : Mobile desktop site in chrome
- Browser Issue on firefox & chrome
- Device Recognizer doesn't seem working. HOT 1
- It would be really cool if you could add Laravel Octane support for this HOT 3
- Package Abandoned? HOT 3
- agent Detection not working with redirect
- [NEW] Detect Device Details with Detective API
- Implement support for Sec-CH-UA headers
- This package compatible with mobile application like android or ios?
- User Agent Chrome Console Warnings
- Mozilla Custom user agent not in Mobile Detect can be misleading [Comment]
- Difference between Device and device type
- How to check if Mobile Browser or Mobile app? HOT 6
- The ajent package cannot correctly distinguish between iPad and desktop HOT 1
- Any plans to support mobile detect v3?
- outdated mobiledetect/mobiledetectlib (2.7) HOT 5
- Wrong mobile detection HOT 4
- Laravel 10 Jetstream v4 conflict HOT 8
- Jailbreak detection or Fake GPS detection on Safari Browser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agent.