How do websites know if someone is using mobile, tablet or computer?

In today’s world we float between devices pretty seamlessly. Laptops, desktops, tablets and mobile devices are in most homes in Australia, and when a customer is looking at your website and wants to move from one device to another, or looks at your site on their computer at work then may check it out again on their tablet or mobile at home, they should have a seamless experience and the web design should allow for a smooth transition between devices. 

What type of devices are customers using?

This will vary greatly depending on your target market, the products or services you sell and how you approach marketing them online. People looking for wood-turning advice are going to have a very different age bracket, device usage and/or browser type than say, an online gaming forum. So it’s important to understand your target market to help build a site that’s going to work well. 


By far the most popular browsers are Chrome and Safari. 

Unfortunately Internet Explorer is still being used (will it ever die?). Here’s a breakdown of browsers based on StatCounters stats for Feb 2018:-

% of Browser usage worldwide

Here at Marketeam we manage hundreds of clients’ websites and their analytics and these numbers and browsers change slightly depending on the client and industry, but on average these numbers are pretty consistent across multiple websites we manage. 
Device usage

Next let’s take a look at what devices people are using to view websites. These are average worldwide stats so may change a little depending on your customer base and products or services. 

Types of devices

As you can see mobile usage is now higher than desktop usage, and that makes sense because there are more mobiles in the world than people so making sure your website is responsive and looks great across all devices is super important these days. 

So how does a website know what device or browser someone is using?

All browsers have this nifty bit of technology called a user agent. A user agent is like an ID card for a browser. Every browser has a different user agent so all that’s needed is to use a piece of script to look at the browser’s user agent and a website will be able to tell what browser is being used to view the website. 

If you want to get really technical, the user agents look a little like this:-

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36


Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1

It’s not only browsers that have user agents. For example, search engines like Google, Yahoo and Bing also have user agents. This is how we can tell search engines to crawl and index certain pages and ignore others through the robots.txt because we can target their user agent and let them know what to do. (Take a look at the Marketeam robots.txt and you will see what we mean).

But we’re not going to get into the really technical aspects of user agents here because we don’t want people to fall asleep at their keyboards! 

Why would web designers want to know what browser people are using?


Well first and foremost it’s important information to gather for statistical purposes. You can start to tell a little about your customer base if you know what browser or operating system they use.

For example, we have a client whose customers predominately use Apple products to view the website. We know this by looking at their statistics. If they were to run a competition with a giveaway, an iTunes card or other Apple-related product or give away would be a great option for them. Without knowing that user agent information (which is pulled into Google Analytics automatically) you wouldn't be able to get that insight and change your marketing strategies to suit your client base.


Believe it or not Internet Explorer users are still kicking around. Internet Explorer is a terrible browser and really needs to crawl into a hole and die. The reason us web developers hate it so much is that it typically causes all sorts of display issues on websites. Users are much better off updating to a modern browser like Chrome, Safari, Firefox or even Edge. By looking at the user agents a website will be able to tell if someone is using Internet Explorer and prompt them to download a more modern browser. 

Marketing opportunities

Want to target mobile users specifically with an offer or to download your app? User agents can help you do this. By identifying the browser or operating system someone is using to view your website, you can target them with specific messages to download your latest app or do some other task that’s mobile related. 


Have you ever been to a website in a different language using the Chrome browser and a little message pops up asking if you would like this page translated? Have you ever wondered how the browser knows that this is a different language and we might need the page translated? Well, user agents also have a language preference so a website will know your language settings and as web developers we can serve up different content (or translated content) based on language settings. 

So now you know how websites know what type of browser you’re using, whether you’re on a mobile device or desktop and why that information is useful to website designers like Marketeam.