Most of the questions about responsive design have the answer to use screen size in a media query to display a mobile design vs desktop design instead of either combining this with a test for phone/tablet/desktop browser or just that test (either server side or in JavaScript).
But many phones now have displays that are 1080p or higher and some browsers will report this in actual pixels (I believe iPhone safari does not). Even with that many pixels, a desktop design for that resolution would not be appropriate on a phone and maybe not even a tablet.
Also, there may be differences in JavaScript (desktop might have mouse-over actions, etc).
What is the best way to handle all of this? Is out really better to just use screen size in a media query? or a combination of this work server side detection? or something else entirely?