How to detect user browser and OS in operating system details in JavaScript

1 Answer

0 votes
console.log(navigator);

  
 
 
/*
run:
 
[object Navigator] {
  appCodeName: "Mozilla",
  appName: "Netscape",
  appVersion: "5.0 (Windows)",
  buildID: "20192000010010",
  clipboard: [object Clipboard] {
    addEventListener: function addEventListener() {
      [native code]
},
    dispatchEvent: function dispatchEvent() {
      [native code]
},
    removeEventListener: function removeEventListener() {
      [native code]
},
    writeText: function writeText() {
      [native code]
}
  },
  cookieEnabled: true,
  credentials: [object CredentialsContainer] {
    create: function create() {
      [native code]
},
    get: function get() {
      [native code]
},
    preventSilentAccess: function preventSilentAccess() {
      [native code]
},
    store: function store() {
      [native code]
}
  },
  doNotTrack: "unspecified",
  duckduckgo: {
    isDuckDuckGo: function () {
      [native code]
},
    platform: "extension"
  },
  geolocation: [object Geolocation] {
    clearWatch: function clearWatch() {
      [native code]
},
    getCurrentPosition: function getCurrentPosition() {
      [native code]
},
    watchPosition: function watchPosition() {
      [native code]
}
  },
  getGamepads: function getGamepads() {
    [native code]
},
  globalPrivacyControl: true,
  hardwareConcurrency: 2,
  javaEnabled: function javaEnabled() {
    [native code]
},
  language: "en-US",
  languages: ["en-US", "en-GB", "en"],
  locks: [object LockManager] {
    query: function query() {
      [native code]
},
    request: function request() {
      [native code]
}
  },
  maxTouchPoints: 0,
  mediaCapabilities: [object MediaCapabilities] {
    decodingInfo: function decodingInfo() {
      [native code]
},
    encodingInfo: function encodingInfo() {
      [native code]
}
  },
  mediaDevices: [object MediaDevices] {
    addEventListener: function addEventListener() {
      [native code]
},
    dispatchEvent: function dispatchEvent() {
      [native code]
},
    enumerateDevices: function enumerateDevices() {
      [native code]
},
    getDisplayMedia: function getDisplayMedia() {
      [native code]
},
    getSupportedConstraints: function getSupportedConstraints() {
      [native code]
},
    getUserMedia: function getUserMedia() {
      [native code]
},
    ondevicechange: null,
    removeEventListener: function removeEventListener() {
      [native code]
}
  },
  mediaSession: [object MediaSession] {
    metadata: null,
    playbackState: "none",
    setActionHandler: function setActionHandler() {
      [native code]
},
    setPositionState: function setPositionState() {
      [native code]
}
  },
  mimeTypes: [object MimeTypeArray],
  mozGetUserMedia: function mozGetUserMedia() {
    [native code]
},
  onLine: true,
  oscpu: "Windows NT 10.0; Win64; x64",
  pdfViewerEnabled: true,
  permissions: [object Permissions] {
    query: function query() {
      [native code]
}
  },
  platform: "Win32",
  plugins: [object PluginArray],
  product: "Gecko",
  productSub: "20100101",
  registerProtocolHandler: function registerProtocolHandler() {
    [native code]
},
  requestMediaKeySystemAccess: function requestMediaKeySystemAccess() {
    [native code]
},
  sendBeacon: function sendBeacon() {
    [native code]
},
  serviceWorker: [object ServiceWorkerContainer] {
    addEventListener: function addEventListener() {
      [native code]
},
    controller: null,
    dispatchEvent: function dispatchEvent() {
      [native code]
},
    getRegistration: function getRegistration() {
      [native code]
},
    getRegistrations: function getRegistrations() {
      [native code]
},
    oncontrollerchange: null,
    onmessage: null,
    onmessageerror: null,
    ready: [object Promise] { ... },
    register: function register() {
      [native code]
},
    removeEventListener: function removeEventListener() {
      [native code]
},
    startMessages: function startMessages() {
      [native code]
}
  },
  storage: [object StorageManager] {
    estimate: function estimate() {
      [native code]
},
    persist: function persist() {
      [native code]
},
    persisted: function persisted() {
      [native code]
}
  },
  taintEnabled: function taintEnabled() {
    [native code]
},
  userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0",
  vendor: "",
  vendorSub: "",
  vibrate: function vibrate() {
    [native code]
},
  webdriver: false
}
 
*/

 



answered Nov 24, 2022 by avibootz

Related questions

1 answer 134 views
1 answer 122 views
1 answer 195 views
2 answers 138 views
138 views asked Mar 20, 2023 by avibootz
1 answer 141 views
141 views asked Apr 12, 2022 by avibootz
1 answer 157 views
157 views asked Feb 21, 2019 by avibootz
2 answers 224 views
...