I develop a small enterprise application and I track screen size to gather stats on what sizes I need to ensure compatibility with. That's pretty common actually.
That said, as /u/nandryshak points out it is very possible to use this for fingerprinting of non-logged-in users. There has been a lot of research showing how users can be identified and uniquely fingerprinted through combinations of that plus plugin/extension versions, etc.
The code I provided does exactly that, it accesses a server endpoint if the width is bigger than 1024px. So if you make a list of options with different endpoints and log which user did what you can fingerprint the screen without JS or XHR. It's an image.
Ah! Woah, as a technique I was already aware of, I glossed over it too fast and failed to connect some neurons. Yeah the image gives it out, no need for scripts.
So that leaves my second paragraph as a defence. Firefox and Tor Browser's fingerprinting resistance deal with CSS media among many other things, including actual screen and window size.
View all comments
52
u/memoized Apr 28 '18
I develop a small enterprise application and I track screen size to gather stats on what sizes I need to ensure compatibility with. That's pretty common actually.
That said, as /u/nandryshak points out it is very possible to use this for fingerprinting of non-logged-in users. There has been a lot of research showing how users can be identified and uniquely fingerprinted through combinations of that plus plugin/extension versions, etc.