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

작성자

카테고리:

← 피드로
DEV Community · ToolAnchor · 2026-07-09 개발(SW)
Cover image for How to check your browser's privacy with 30 lines of JavaScript — and what I learned

WebsiteGeek

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?

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다