is there some "best-practice" to detect mobile devices, which physically have small screen, but with high pixel definition? for example some smartphones has and 4.7 inch screen size, and at the same full-hd 1920x1080. i need to show mobile header on site instead of standart desktop, and use css query for this. for example
@media (max-width: 1024px){
#responsive_mobile_header{
display: block;
}
#desktop_header{
display: none;
}
}
this works for a big amount of devices, but for full-hd mobile i need another way...
regexp also not the best way - new browsers and new id appear suddenly, they will not be detected