Detection of Retina (high-res) display


how can I detect in Vaadin that a session is running on a high-res display?

I see that if I display images with double resolution it looks significantly better on a Retina display.
However, sending larger images to non-Retina displays makes no sense and may look even worse, for example with IE11.

How would this be handled best?

Thanks in advance!

Hi Andreas,

have a look here:


and at

to get an idea of how to query the browser for its resolution.

Once you know the resolution available, you could write a pure-JS (without GWT) add-on for Vaadin that relays the information to the server-side session. Some example for such small add-on is here:

I didn’t find a ready-made solution here:
so it would be nice if you could publish your solution there when you’re finished.

HTH, Best Regards,