Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,895 questions

51,826 answers

573 users

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 120 views
1 answer 111 views
1 answer 177 views
2 answers 122 views
122 views asked Mar 20, 2023 by avibootz
1 answer 132 views
132 views asked Apr 12, 2022 by avibootz
1 answer 143 views
143 views asked Feb 21, 2019 by avibootz
2 answers 199 views
...