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

时间:2011-11-18 09:29:48

标签: javascript data-mining data-retrieval

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

  • 地理位置
  • IP地址
  • 浏览器软件
  • 退出位置
  • 入口位置

我理解用户可以更改任何此类信息,并且其可靠性纯粹与信任相关,但我仍然对从客户端挖掘其他信息感兴趣。

3 个答案:

答案 0 :(得分:48)

以下是大部分信息:

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


    };

答案 1 :(得分:16)

不要忘记

  • 屏幕尺寸
  • 允许使用Cookie
  • 允许使用Java
  • 移动版或桌面版
  • 语言

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

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

答案 2 :(得分:7)

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

,包括:

  1. 大陆,国家和城市
  2. 上次访问日期
  3. 参考网站或搜索引擎(包括搜索字词)
  4. 在网站上花费的时间
  5. 浏览器和操作系统
  6. IP地址
  7. 语言
  8. 浏览器
  9. OS
  10. 屏幕尺寸
  11. 还有更多。

    http://www.visitorjs.com/

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

相关问题