Every time your browser loads a page, it hands the server a small bundle of facts about you. Some are unavoidable, some need JavaScript, and some need your explicit permission. A few things people worry about are not visible at all.

If you build websites, this list matters twice: it is what your users are exposed to, and it is what you end up collecting, whether you planned to or not. Here is the honest version, sorted from "always" to "never".

What every request carries, before any JavaScript runs

These arrive with the HTTP request itself. A server sees them even if the page has no scripts.

What the server sees Where it comes from Notes
IP address The network connection The address of whatever connected: your router, your mobile carrier, a VPN, a proxy or a relay.
User-Agent Request header Browser and OS in a free text string. Easy to change, so never proof of anything.
UA client hints Sec-CH-UA, Sec-CH-UA-Mobile, Sec-CH-UA-Platform Low entropy hints that supporting browsers can send by default. A site must ask with Accept-CH for more detail.
Preferred languages Accept-Language The language list from your browser settings.
Where you came from Referer With the default policy, cross origin requests only get the origin (like https://example.com/), not the full path.
Cookies Cookie Only the cookies that belong to that site.

Two details from that table trip people up.

First, the IP address is not "your computer". It is the last hop that talked to the server. On a phone it is often an address shared by many customers of the same carrier. Behind a VPN it is the VPN server.

Second, the Referer header leaks less than it used to. MDN documents strict-origin-when-cross-origin as the default policy when a site sets none, which strips the path and query string from cross origin requests.

What JavaScript can add

Once scripts run, the page can read more about the device and settings.

  • Time zone: Intl.DateTimeFormat().resolvedOptions().timeZone returns something like Asia/Karachi.
  • Languages: navigator.languages returns the full list, in order.
  • Screen and window size, plus the device pixel ratio.
  • Some hardware hints, such as the number of logical CPU cores. Support varies by browser.
  • Your public IP through WebRTC: a page can ask a STUN server what address your connection appears from. Browsers now commonly replace private addresses in WebRTC candidates with random .local names, a technique described in an IETF draft, so your home network layout is usually not exposed.
  • Copy events: yes, a page can tell when you copy text from it. The copy event fires on the element you copied from.

Here is a tiny script you can paste into the console of any page to see a few of these values about yourself:

const snapshot = { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone, languages: navigator.languages, screen: `${screen.width}x${screen.height} @ ${devicePixelRatio}x`, cores: navigator.hardwareConcurrency, }; console.table(snapshot); 

None of these values is unique on its own. Combined, they become a fingerprint, which is why browsers keep trimming what is exposed by default.

What needs your permission

Some data sits behind a browser prompt, and a site gets nothing until you click Allow.

  • Precise location from the Geolocation API. Without permission, the best a site can do is guess from your IP address, and that guess is often a different city.
  • Camera and microphone.
  • Notifications, clipboard reads and other sensitive features.

If a site seems to know your street, you either granted location at some point, you are logged in with an address on file, or the site is using something you typed into a form. IP data alone does not give a street address.

What a website cannot see

These come up constantly in searches, so let's settle them.

  • Your MAC address. It never leaves your local network. The website only sees IP level information.
  • Your other tabs. Pages from different sites are isolated from each other. One site cannot read what another tab is showing.
  • Your browsing history. Browsers restrict how the :visited style can be read. MDN notes that getComputedStyle deliberately returns the unvisited color, which closes the old history sniffing trick.
  • Your name or email. Not unless you type it, log in, or a third party script on the page already knows you.
  • Your exact home address from your IP. IP geolocation is approximate by design.
  • Screenshots. There is no reliable web API for detecting an operating system screenshot. At most, a focused page can see some key presses.

Extensions are a grey area. A site cannot list them, but some extensions give themselves away by changing the page.

What this means if you build websites

Knowing what you can see is the easy part. Deciding what to keep is the real work.

  1. Log less. IP addresses count as personal data in many legal frameworks. Keep them for as long as you need them for security, then drop or truncate them.
  2. Treat headers as claims, not facts. User-Agent and Accept-Language are hints a user can change in seconds.
  3. Do not overtrust IP location. Use it for defaults like currency or language, and always let people override it.
  4. Respect the prompt. If you need precise location, ask at the moment it is useful and explain why.
  5. Audit your third party scripts. Analytics and ad tags often collect far more than your own code does.

Quick answers

Can websites see your IP address?
Yes, always. It is how the server knows where to send the response. It sees the address of whatever connected, which may be a VPN, proxy or carrier gateway.

Can a website see my MAC address?
No. MAC addresses stay on your local network.

Can a website know my location without permission?
Only roughly, from your IP address. Precise location requires the Geolocation permission.

Does a VPN hide all of this?
No. A VPN changes the IP address the site sees. Cookies, logins, browser settings and fingerprints stay the same.

Wrapping up

The honest summary: a website sees your connection's IP address, your headers and anything its scripts can read from the browser. It sees your precise location only if you allow it, and it never sees your MAC address, your other tabs or your history.

This is the first post in a series about IP addresses for web developers. Next up: why validating IP addresses with a regex is a trap. What surprised you most on this list? Tell me in the comments.

This post was drafted with AI assistance and reviewed by the author before publishing.

Further reading