66

I'm trying to compile a list of information that is accessible via javascript such as:

  • Geo-location
  • IP address
  • Browser software
  • Exit location
  • Entrance location

I understand that a user can alter any of this information and that it's reliability is purely trust related, but I am still interested in what other information can be mined from the client.

madhead
  • 31,729
  • 16
  • 153
  • 201
George Reith
  • 13,132
  • 18
  • 79
  • 148

3 Answers3

106

Here is most of the information:

var info={

    timeOpened:new Date(),
    timezone:(new Date()).getTimezoneOffset()/60,

    pageon(){return window.location.pathname},
    referrer(){return document.referrer},
    previousSites(){return history.length},

    browserName(){return navigator.appName},
    browserEngine(){return navigator.product},
    browserVersion1a(){return navigator.appVersion},
    browserVersion1b(){return navigator.userAgent},
    browserLanguage(){return navigator.language},
    browserOnline(){return navigator.onLine},
    browserPlatform(){return navigator.platform},
    javaEnabled(){return navigator.javaEnabled()},
    dataCookiesEnabled(){return navigator.cookieEnabled},
    dataCookies1(){return document.cookie},
    dataCookies2(){return decodeURIComponent(document.cookie.split(";"))},
    dataStorage(){return localStorage},

    sizeScreenW(){return screen.width},
    sizeScreenH(){return screen.height},
    sizeDocW(){return document.width},
    sizeDocH(){return document.height},
    sizeInW(){return innerWidth},
    sizeInH(){return innerHeight},
    sizeAvailW(){return screen.availWidth},
    sizeAvailH(){return screen.availHeight},
    scrColorDepth(){return screen.colorDepth},
    scrPixelDepth(){return screen.pixelDepth},


    latitude(){return position.coords.latitude},
    longitude(){return position.coords.longitude},
    accuracy(){return position.coords.accuracy},
    altitude(){return position.coords.altitude},
    altitudeAccuracy(){return position.coords.altitudeAccuracy},
    heading(){return position.coords.heading},
    speed(){return position.coords.speed},
    timestamp(){return position.timestamp},


    };
Niel Ryan
  • 1,123
  • 2
  • 7
  • 9
  • 14
    I heard that's possible to get battery info from mobile device, and some website, such hotel reservation websites, increase their prices when your battery is near empty. – Below the Radar Aug 31 '16 at 16:54
  • 4
    battery level is only accessible on some browsers, iOS 9 it's not available – Niel Ryan Sep 10 '16 at 08:56
  • 3
    @BelowtheRadar a reference would be nice – Danielson May 20 '19 at 18:18
  • 12
    `position` is undefined. – Spectric Apr 22 '21 at 03:14
  • 1
    @BelowtheRadar https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API – Pedro Lobito Apr 19 '22 at 22:54
  • @PedroLobito Seems like Firefox and Safari are the only modern browsers that block "spoofing" on battery status https://groups.google.com/g/mozilla.dev.platform/c/5U8NHoUY-1k/m/9ybyzQIYCAAJ Another reason why I prefer FF over all – Below the Radar Apr 22 '22 at 13:24
  • Navigator.appName is depcreated and returns always Netscape. https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appName. The same counts for navigator.product (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/product), navigator.appVersion (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appVersion). One can not rely on information gathered by these properties. – DanielHefti Feb 20 '23 at 10:12
23

Don't forget about

  • Screen Size
  • Allowed Cookies
  • Allowed Java
  • Mobile or Desktop
  • Language

And here is useful link with data-mining demo:

http://www.alanwood.net/demos/browserinfo.html

Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
8

visitor.js is a javascript library that provides information about the client.

Including:

  1. Continent, Country and city
  2. Date of last visit
  3. Referring website or search engine (including search term)
  4. Time spent on the website
  5. Browser and operating system
  6. IP Address
  7. Language
  8. Browser
  9. OS
  10. Screen size

And more.

http://www.visitorjs.com/

Visitorjs might be very handy, it's not free however.

call-me
  • 686
  • 9
  • 18