Hacker News new | ask | show | jobs
by tedunangst 2667 days ago
Are you also going to download every resource listed in every @media section of the CSS regardless of screen size?
2 comments

That part doesn't seem too unreasonable to me, but you could also just go with the largest available size and then scale it as necessary on the client.
Scaling down the largest size isn't always appropriate (though would probably work in most cases).

One example might be a set of images where the smaller images wrap text more agressively to work better on a screen that's not as wide.

Good point, I've seen comparable use cases in the wild but it slipped my mind!
The browser could pick a fake screen size, and behave in a way that is consistent with that fake screen size. This would probably break many sites, but it would mitigate fingerprinting if a common size was used.
This solution is just begging for side-channel attacks.

Firefox had better make sure its timing is not affected by such shenanigans, for instance.

I doubt that is avoidable, as the browser would still probably need to render at the false viewport dimensions. For a common adversary, fingerprinting based on timing would be more involved and less useful.