Javascript 我们可以从客户端获取哪些信息?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8180296/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 04:59:48  来源:igfitidea点击:

What information can we access from the client?

javascriptdata-miningdata-retrieval

提问by George Reith

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

我正在尝试编译可通过 javascript 访问的信息列表,例如:

  • Geo-location
  • IP address
  • Browser software
  • Exit location
  • Entrance location
  • 地理位置
  • IP地址
  • 浏览器软件
  • 出口位置
  • 入口位置

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.

我知道用户可以更改任何这些信息,并且它的可靠性完全与信任有关,但我仍然对可以从客户端挖掘哪些其他信息感兴趣。

采纳答案by Marek Sebera

Don't forget about

不要忘记

  • Screen Size
  • Allowed Cookies
  • Allowed Java
  • Mobile or Desktop
  • Language
  • 屏幕尺寸
  • 允许的 Cookie
  • 允许的 Java
  • 移动或桌面

And here is useful link with data-mining demo:

这是与数据挖掘演示的有用链接:

http://javascriptsource.com/user-details/browser-properties.html

http://javascriptsource.com/user-details/browser-properties.html

回答by Niel Ryan

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},


    };

回答by call-me

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

visitor.js 是一个 javascript 库,提供有关客户端的信息。

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
  1. 大陆、国家和城市
  2. 上次访问日期
  3. 推荐网站或搜索引擎(包括搜索词)
  4. 在网站上花费的时间
  5. 浏览器和操作系统
  6. IP地址
  7. 浏览器
  8. 操作系统
  9. 屏幕尺寸

And more.

和更多。

http://www.visitorjs.com/

http://www.visitorjs.com/

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

Visitorjs 可能非常方便,但它不是免费的。