News for hackers. Stuff that matters.
Re:I Wanted to Type a Number (2016) by ThePadawan on Wednesday March 27, 2019 @04:09AM (#19498877)
I have been thinking about a similar question while building a image hosting site.

Which resolution of thumbnail should I provide for each client?

On a desktop, I can be reasonably sure that the user doesn't have limited data or bandwidth, but their resolution (and dpi) might be quite small.

On mobile, the user might have a hiDPI screen which indicates I should send them a high-resolution thumbnail. But I don't know if they would like me spending their limited data or bandwidth that liberally.

So far, I haven't found a way to indicate or request these sort of preferences, but with the up-and-coming support for srcSet, <picture> elements etc., I would love to provide multiple thumbnail alternatives if a client could reasonably decide between them.

Re:I Wanted to Type a Number (2016) by pjmlp on Wednesday March 27, 2019 @07:27AM (#19499788)
A possible solution, but it requires JavaScript enabled, and manual work, is to have a service worker provide such information up to the server.