Dev.to Security 🔐 Cybersecurity 👁 1

How to check your browser's privacy with 30 lines of JavaScript — and what I learned

What most people don't know about their browser Your browser leaks more than you think — and you don't need a third-party tool to check it. Most of the signals you need are already in the browser's native APIs.

What most people don't know about their browser

Your browser leaks more than you think — and you don't need a third-party tool to check it. Most of the signals you need are already in the browser's native APIs.

The 6 checks I run (and the JS code)

1. HTTPS status
window.location.protocol === 'https:'

2. Cookies enabled
navigator.cookieEnabled

3. Local storage available
Try/catch a localStorage.setItem() call

4. Do Not Track signal
navigator.doNotTrack === '1'

5. Private/Incognito heuristic
Check localStorage quota — private mode caps it at ~5MB in most browsers

6. Browser detection
navigator.userAgent parsing for Chrome/Firefox/Safari/Edge

Turning it into a score

Each check that passes adds points to a score out of 100. I weight DNT and HTTPS more heavily because they have the most real-world impact.

What I built with this

A free browser privacy checker that runs these 6 checks instantly and gives you a score, a verdict, and a personalized list of things to fix.

👉 Browser Privacy & Security Checkup

What I want to add next

  • WebRTC leak detection (navigator.mediaDevices.enumerateDevices)
  • Canvas fingerprint score
  • Third-party cookie isolation check

What would you add? Have you built something similar?

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.