To make a website responsive I know that we need to use css(media queries)or framework..to test if a website is responsive we need just to resize browser to see the effect.  

But I have a question for example this websites paypal.com or stackoverflow.com it's responsive on mobile,but when I try to login to it from my desktop and resizing browser(not responsive)  

 So how these websites detects devices of visitors?
Thank you