{"action":"created","issue":{"url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/98","labels_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/98/comments","events_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/98/events","html_url":"https://github.com/Valve/fingerprintjs2/issues/98","id":121584536,"number":98,"title":"getScreenResolution is zoom dependent for IE and FF","user":{"login":"mp31415","id":2955622,"avatar_url":"https://avatars.githubusercontent.com/u/2955622?v=3","gravatar_id":"","url":"https://api.github.com/users/mp31415","html_url":"https://github.com/mp31415","followers_url":"https://api.github.com/users/mp31415/followers","following_url":"https://api.github.com/users/mp31415/following{/other_user}","gists_url":"https://api.github.com/users/mp31415/gists{/gist_id}","starred_url":"https://api.github.com/users/mp31415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mp31415/subscriptions","organizations_url":"https://api.github.com/users/mp31415/orgs","repos_url":"https://api.github.com/users/mp31415/repos","events_url":"https://api.github.com/users/mp31415/events{/privacy}","received_events_url":"https://api.github.com/users/mp31415/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-10T21:46:48Z","updated_at":"2015-12-21T15:42:58Z","closed_at":null,"body":"In Chrome getScreenResolution (screen.height, screen.width, screen.availHeight, screen.availWidth) is zoom independent, however in IE and FF these values change upon zoom in/zoom out. (Not sure about Safari/Opera). It makes fingerprint less stable I think. The extra code I use to deal with the issue is the following:\r\n\r\n```javascript\r\ngetScreenResolution: function(keys) {\r\n\tthis.getScreenResolutionOrAvail(keys, screen.width, screen.height);\r\n\tthis.getScreenResolutionOrAvail(keys, screen.availWidth, screen.availHeight);\r\n\treturn keys;\r\n},\r\ngetScreenResolutionOrAvail: function(keys, saw, sah) {\r\n  var res;\r\n  if(saw && sah) {\r\n\t  var zoom = 1;\r\n\t  if (this.isIE()) {\r\n\t\t  zoom = screen.deviceXDPI / screen.systemXDPI;\r\n\t\t  zoom = this.round5(zoom*100)/100;\r\n\t  }\r\n\t  else if (this.isFF()) {\r\n\t\t  zoom = window.devicePixelRatio;\r\n\t  }\r\n\t  if (zoom != 1) {\r\n\t\tsah = this.round10(sah * zoom);\r\n\t\tsaw = this.round10(saw * zoom);\r\n\t  }\r\n\t  res = (sah > saw) ? [sah, saw] : [saw, sah];\r\n  }\r\n  if(typeof res !== \"undefined\") { // headless browsers\r\n\tkeys.push(res);\r\n  }\r\n  return keys;\r\n},\r\nround5: function (x)\r\n{\r\n\treturn Math.round(x/5)*5;\r\n},\r\nround10: function (x)\r\n{\r\n\treturn Math.round(x/10)*10;\r\n},\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/comments/166333878","html_url":"https://github.com/Valve/fingerprintjs2/issues/98#issuecomment-166333878","issue_url":"https://api.github.com/repos/Valve/fingerprintjs2/issues/98","id":166333878,"user":{"login":"Valve","id":27387,"avatar_url":"https://avatars.githubusercontent.com/u/27387?v=3","gravatar_id":"","url":"https://api.github.com/users/Valve","html_url":"https://github.com/Valve","followers_url":"https://api.github.com/users/Valve/followers","following_url":"https://api.github.com/users/Valve/following{/other_user}","gists_url":"https://api.github.com/users/Valve/gists{/gist_id}","starred_url":"https://api.github.com/users/Valve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Valve/subscriptions","organizations_url":"https://api.github.com/users/Valve/orgs","repos_url":"https://api.github.com/users/Valve/repos","events_url":"https://api.github.com/users/Valve/events{/privacy}","received_events_url":"https://api.github.com/users/Valve/received_events","type":"User","site_admin":false},"created_at":"2015-12-21T15:42:58Z","updated_at":"2015-12-21T15:42:58Z","body":"I've just upgraded my old laptop to Windows 10 and tested on MS Edge. The FP is changing depending on the zoom. The laptop has the resolution of 1600x1200, so I will take a look into it."}}