<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sid Wudraq</title>
    <description>The latest articles on DEV Community by Sid Wudraq (@sid_wudraq_0420da4e4f43e5).</description>
    <link>https://dev.to/sid_wudraq_0420da4e4f43e5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3737371%2F85093000-d948-41b8-91ba-9d879b30115e.png</url>
      <title>DEV Community: Sid Wudraq</title>
      <link>https://dev.to/sid_wudraq_0420da4e4f43e5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sid_wudraq_0420da4e4f43e5"/>
    <language>en</language>
    <item>
      <title>Test Proxy for UDP Leaks: Six Checks for SOCKS5 and WebRTC</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Fri, 13 Nov 2026 15:30:00 +0000</pubDate>
      <link>https://dev.to/octobrowser/test-proxy-for-udp-leaks-six-checks-for-socks5-and-webrtc-ieo</link>
      <guid>https://dev.to/octobrowser/test-proxy-for-udp-leaks-six-checks-for-socks5-and-webrtc-ieo</guid>
      <description>&lt;p&gt;A SOCKS5 proxy is configured, pages open, and an IP-check site shows the proxy's address. That looks like a working setup, but it only covers TCP traffic. Calls, WebRTC, QUIC and HTTP/3 run over UDP, and UDP can take a different route from the one the page uses.&lt;/p&gt;

&lt;p&gt;To test a proxy for UDP leaks, one question matters: does UDP traffic leave from the same address as TCP traffic? The sections below describe six public checks that answer the question from different angles, and the limits of the result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Six checks, six angles
&lt;/h2&gt;

&lt;p&gt;No single page covers every UDP-based technology, so six public tools are used together. Each one looks at a different protocol or channel.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;What it tests&lt;/th&gt;
&lt;th&gt;A pass looks like&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="http://networktest.twilio.com/" rel="noopener noreferrer"&gt;Twilio Network Test&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;WebRTC calls over UDP&lt;/td&gt;
&lt;td&gt;All checks pass, including TURN UDP connectivity, and the test calls finish with no packet loss&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="http://browserleaks.com/quic" rel="noopener noreferrer"&gt;BrowserLeaks QUIC&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;QUIC support and the address seen over QUIC&lt;/td&gt;
&lt;td&gt;QUIC connection is true and the IP matches the proxy exit address&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a href="http://ipbinding.notsosmart.dev/" rel="noopener noreferrer"&gt;WebRTC Detection Check&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Addresses over HTTP, STUN, TURN UDP and TURN TCP, plus spoofing flags&lt;/td&gt;
&lt;td&gt;All four sources show the same IP and no detection flag is raised&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;a href="http://quic.nginx.org/quic.html" rel="noopener noreferrer"&gt;NGINX QUIC Sandbox&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;HTTP/3 under sustained load, 3,000 requests&lt;/td&gt;
&lt;td&gt;Every request succeeds over QUIC, with no fallback to HTTP and no failures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;a href="http://wtcheck.top/" rel="noopener noreferrer"&gt;wtcheck.top&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;WebTransport address against the TCP address&lt;/td&gt;
&lt;td&gt;Both addresses are identical&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;a href="http://browserleaks.com/dns" rel="noopener noreferrer"&gt;BrowserLeaks DNS&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Which resolvers answer DNS queries&lt;/td&gt;
&lt;td&gt;Resolvers belong to the exit node's provider, not to the local ISP&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The reference value for every check is the same: the proxy's exit address, as shown by a regular TCP IP check.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Twilio Network Test: do real calls work over UDP?
&lt;/h3&gt;

&lt;p&gt;This is Twilio's own diagnostic for checking whether a network can handle browser-based voice calls. It knows nothing about leaks or proxies. It simply tries to make calls, which makes it a useful neutral first step.&lt;/p&gt;

&lt;p&gt;The key line is TURN UDP connectivity: it means UDP packets left the browser, reached Twilio's servers and came back. The tool then places two test calls with different audio codecs (PCMU and Opus) and reports packet loss and a quality rating for each. Twilio also notes that its voice service does not work over TCP, so a successful call can only have gone over UDP.&lt;/p&gt;

&lt;p&gt;A pass is a green connectivity result and two completed calls with no packet loss. If the UDP connectivity line fails, the proxy either blocks UDP or does not support it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1rakvfr1kd2oogtj7k79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1rakvfr1kd2oogtj7k79.png" alt="Twilio Network Test" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;September 10, 12:04. One tab—the session has just started.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. BrowserLeaks QUIC: does UDP work for ordinary web traffic?
&lt;/h3&gt;

&lt;p&gt;Check 1 covered UDP used for calls. QUIC is a different use of UDP: it carries regular web traffic and is the transport under HTTP/3, which large sites already use. Support for one does not imply support for the other, so both need a test.&lt;/p&gt;

&lt;p&gt;The page answers two questions at once. First, whether a QUIC connection was established at all. Second, which IP address the server saw during that connection. Compare that address with the reference value from the regular TCP check.&lt;/p&gt;

&lt;p&gt;A pass is a QUIC connection reported as true and an address equal to the proxy exit address. A different address means QUIC traffic is bypassing the proxy. A false result means QUIC is blocked.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa2y3ecb7tpth509lpl4n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa2y3ecb7tpth509lpl4n.png" alt="Browserleaks test" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;September 10, 12:04. There are now two tabs—Twilio is still open on the left.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. WebRTC Detection Check: the same address across four channels
&lt;/h3&gt;

&lt;p&gt;This page compares how the browser's address looks through four routes: a plain HTTP request over TCP, a STUN request over UDP, a TURN relay over UDP and the same relay over TCP. If the proxy handles UDP correctly, all four show one address.&lt;/p&gt;

&lt;p&gt;It also raises detection flags for suspicious setups, such as WebRTC blocked, a mismatch between UDP and TCP addresses, spoofed ICE candidates, blocked TURN traffic or a fake relay. The flags matter because some setups hide the real address by switching WebRTC off or by feeding it substitute values. Both approaches are visible here: disabling WebRTC trips the first flag, and substitution trips the spoofing flags.&lt;/p&gt;

&lt;p&gt;A pass is four identical addresses and no raised flag. A mismatch between the TCP line and the STUN line is the classic leak.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6sv68bxotneovyi42fw3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6sv68bxotneovyi42fw3.png" alt="WebRTC Detection Check" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;September 10, 12:05. Third tab, with the two previous tests still open on the left.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. NGINX QUIC Sandbox: does HTTP/3 hold up under load?
&lt;/h3&gt;

&lt;p&gt;Check 2 opens one QUIC connection. This test sends 3,000 requests in a row and sorts them into three counters: succeeded over QUIC, succeeded over plain HTTP, and failed. It shows whether the channel stays stable, not only whether it starts.&lt;/p&gt;

&lt;p&gt;The second counter is the most informative. Browsers fall back to regular HTTP when QUIC does not work, so a page that loads normally proves nothing about QUIC. A fallback count above zero means some requests could not use UDP and quietly took the TCP route.&lt;/p&gt;

&lt;p&gt;A pass is all 3,000 requests over QUIC, zero over HTTP and zero failed. Many fallbacks or failures point to an unstable UDP path, which matters for long sessions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi7qp0cq8m97usgzc7tey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fi7qp0cq8m97usgzc7tey.png" alt="NGINX QUIC Sandbox" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;September 10, 12:07. Fourth tab.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. wtcheck.top: WebTransport as a third UDP path
&lt;/h3&gt;

&lt;p&gt;WebTransport is another browser feature built on QUIC. It is tested separately because each protocol can behave differently, and a passed WebRTC or QUIC test does not rule out a problem in a third path.&lt;/p&gt;

&lt;p&gt;The page makes two requests and shows both results side by side: the address of an ordinary TCP request and the address of the WebTransport connection. &lt;/p&gt;

&lt;p&gt;A pass is two identical addresses. Two different addresses mean WebTransport traffic leaves outside the proxy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxbe6kcc9zsi4d3kwk8ys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxbe6kcc9zsi4d3kwk8ys.png" alt="wtcheck.top" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;September 10, 12:10. Fifth tab.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  6. BrowserLeaks DNS: who answers the name lookups?
&lt;/h3&gt;

&lt;p&gt;DNS is a separate channel. A proxy can be configured correctly while the browser still asks the local provider's resolver for site addresses. This has two effects: the provider can see which sites are visited, and a website can notice that the resolver's location does not match the IP address's location.&lt;/p&gt;

&lt;p&gt;The test lists the DNS servers that took part in resolving its queries, together with the provider that owns each one. The useful figure is the number of different providers. In a clean setup, the resolvers belong to the exit node's provider.&lt;/p&gt;

&lt;p&gt;A pass is resolvers owned by the same provider as the exit address, or by a public DNS service chosen on purpose. The red flag is the local ISP's resolvers appearing in the list. A resolver from a different company is not automatically a leak, so the owner and location matter more than the raw count.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fapzpoq902mrklhgpvp1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fapzpoq902mrklhgpvp1b.png" alt="BrowserLeaks DNS test results" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;September 10, 12:11. Sixth tab, with all previous tests still open on the left.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How to run the checks and read the results
&lt;/h2&gt;

&lt;p&gt;The checks give more information when they run in one continuous session, so that nothing changes between them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a browser or profile with the SOCKS5 proxy configured, and note the exit address from a regular IP-check site. This is the reference value.&lt;/li&gt;
&lt;li&gt;Open the six pages from the table in separate tabs one by one, without closing earlier tabs and without changing proxy or browser settings in between.&lt;/li&gt;
&lt;li&gt;For each page, compare the address it reports with the reference value.&lt;/li&gt;
&lt;li&gt;Check the DNS result last, and look at who owns the resolvers rather than at a single IP.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The failures follow a few patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A different address in checks 2, 3 or 5.&lt;/strong&gt; UDP is leaving outside the proxy, so a site can see the real address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;QUIC is false, WebRTC is reported as blocked, or the Twilio test fails on UDP.&lt;/strong&gt; UDP is blocked or the proxy does not support it. Many SOCKS5 proxies are TCP-only, so this is worth confirming with the provider.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resolvers from a different provider in check 6.&lt;/strong&gt; DNS queries bypass the proxy. The local resolver can then see the browsing history, and a site can compare the resolver's location with the IP address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check 4 falls back to HTTP or reports failed requests.&lt;/strong&gt; UDP works but not reliably under load, which matters for long sessions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What these checks do not prove
&lt;/h2&gt;

&lt;p&gt;A passing run shows that one proxy behaved correctly in one browser at one moment. It does not show that the setup is safe in general.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The result belongs to a single combination of browser version, proxy and exit address. A different proxy, a rotating exit IP or a browser update can change it.&lt;/li&gt;
&lt;li&gt;Public test pages change or go offline, and their detection logic is not a standard. A page that reports no flags is not a guarantee against every anti-fraud system.&lt;/li&gt;
&lt;li&gt;Some test services limit requests per IP, so a shared proxy address can produce an error unrelated to leaks.&lt;/li&gt;
&lt;li&gt;The tests cover the channels listed in the table. Other traffic, such as extensions or system-level requests, is outside them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For anything that matters, the checks should be repeated after changing the proxy, the browser version or the profile settings, and a rotating proxy should be tested more than once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example run in Octo Browser
&lt;/h2&gt;

&lt;p&gt;Octo Browser, an anti-detect browser that keeps a separate profile (fingerprint, proxy, cookies) per task, supports UDP over SOCKS5. WebRTC, QUIC, HTTP/3 and WebTransport traffic is routed through the proxy instead of bypassing it, and the profile bar shows the UDP exit address next to the proxy, which gives a ready reference value for the checks above.&lt;/p&gt;

&lt;p&gt;The six checks were run in an Octo Browser profile with a SOCKS5 proxy, and none of them showed a leak: all six reported the same exit address for TCP and UDP. This is a single run, so the same procedure should be repeated with your own proxy before relying on it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;To test a proxy for UDP leaks, compare six angles against one reference address: WebRTC calls, QUIC, address matching across four channels, sustained HTTP/3, WebTransport and DNS ownership. Passing all six describes one proxy at one moment, so the run is worth repeating whenever the proxy or browser changes. To try the profile-based setup from the example, the promo code DEVTO gives new users 4 days of the Starter plan.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>security</category>
      <category>privacy</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Stop Renting SEO Tools: Build Your Own Query Clustering System in Python</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Wed, 23 Sep 2026 15:16:30 +0000</pubDate>
      <link>https://dev.to/octobrowser/stop-renting-seo-tools-build-your-own-query-clustering-system-in-python-jca</link>
      <guid>https://dev.to/octobrowser/stop-renting-seo-tools-build-your-own-query-clustering-system-in-python-jca</guid>
      <description>&lt;p&gt;Clustering is one of the most time-consuming parts of working with keyword data. Building and cleaning up a list of queries is usually pretty easy, but sorting thousands of keywords into clusters with the same search intent is where things get tricky.&lt;/p&gt;

&lt;p&gt;Tools like Semrush, Ahrefs, and LowFruits make this job easier, but they come with limits on volume, settings, and how good the output actually is. This becomes especially obvious in complex niches, where automatic algorithms might group queries with different intents together or split apart phrases that are nearly identical in meaning.&lt;/p&gt;

&lt;p&gt;Neural networks let you tackle this problem in a different way. Instead of matching individual words and lexical overlaps, queries get turned into multidimensional vectors called embeddings. You can then compare them by semantic similarity and use that to build clusters automatically.&lt;/p&gt;

&lt;p&gt;In this article, we'll walk through how to build your own scalable clustering pipeline on a local machine or server, from automated collection of keyword and SERP data using an anti-detect browser to vectorization, grouping, and post-processing the results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Collecting Keyword Data
&lt;/h2&gt;

&lt;p&gt;There are a few ways to collect keyword data, but the basic process usually follows the same pattern: first, you build an initial pool of queries using services like Google Ads Keyword Planner and other tools that provide search volume data for your topic.&lt;/p&gt;

&lt;p&gt;Then you expand that initial set with related queries, search suggestions, and other keyword sources. In the past, this kind of work was often handled by a single tool, but these days you usually need to combine several tools or write custom scripts to gather everything you need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using automation tools to collect keyword data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If commercial solutions don't fit your budget, feature needs, or limitations, you can automate part of the keyword collection yourself. For example, to pull search suggestions and other data from web interfaces, you can use headless browsers built on Puppeteer or Playwright.&lt;/p&gt;

&lt;p&gt;If you're collecting keyword data across a large number of parallel sessions, you need to manage browser profiles and their environments safely. This is where an anti-detect browser like &lt;a href="https://blog.octobrowser.net/octo-browser-review-main-features" rel="noopener noreferrer"&gt;Octo Browser&lt;/a&gt; comes in handy—it lets you isolate sessions, manage profile settings, and connect different proxies. That simplifies your scraping infrastructure and cuts down on the manual setup required for each browser instance.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can try Octo Browser for free with promo code DEVTO (4 days of the Starter subscription). &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The main challenge with collecting data at scale is the restrictions that search engines put in place. Automated requests can trigger rate limits, CAPTCHAs, or other protection mechanisms, so when you're designing a pipeline like this, you need to plan for session stability, request frequency, and temporary blocks.&lt;/p&gt;

&lt;p&gt;When working with browser automation, it's also important to control environment parameters like the User-Agent, window size, locale, WebGL, and other browser session characteristics. You can handle this with your own Puppeteer or Playwright configs, or with specialized browser solutions that let you spin up isolated profiles with different environment settings.&lt;/p&gt;

&lt;p&gt;Network infrastructure is another separate task. You can use different types of proxies for distributed data collection: datacenter, residential, or mobile. The choice depends on request volume and your requirements for stability, speed, and cost. Datacenter proxies are usually cheaper and faster, but in some scenarios they're more likely to get restricted. Residential and mobile addresses tend to be more resilient, but they cost more and offer lower throughput.&lt;/p&gt;

&lt;p&gt;Once the main data collection is done, you can round out your final list of queries with data from external keyword databases. The goal is to end up with as complete a set of queries as possible, which you can then pass on to the cleaning, normalization, and clustering stages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning data before vectorization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After collecting your keyword data, you'll end up with a file containing tens of thousands of search queries. At first glance, it might look ready for vectorization and clustering, but the quality of your results depends heavily on how well the data is prepared beforehand.&lt;/p&gt;

&lt;p&gt;At this stage, Pandas and NumPy are handy for cleaning and normalizing your input dataset. A raw query list almost always contains duplicates, unnecessary characters, technical clutter, irrelevant phrases, and other artifacts that creep in during parsing and when merging multiple sources.&lt;/p&gt;

&lt;p&gt;An embedding model will turn those strings into vectors anyway, but that creates unnecessary computational overhead and can mess up the structure of your resulting clusters. That's why it's a good idea to get the data into a consistent, predictable format before vectorization.&lt;/p&gt;

&lt;p&gt;Here are the main preparation stages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Removing technical clutter&lt;/strong&gt;. HTML tags, extra spaces, invisible characters, emojis, and other elements that may have slipped in during scraping get stripped out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Global deduplication&lt;/strong&gt;. When you combine queries from multiple sources, overlaps are almost inevitable. There's no point in vectorizing the same string more than once, so full duplicates should be removed upfront.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stop-word filtering&lt;/strong&gt;. At this stage, you can exclude queries containing irrelevant place names, unwanted markers, or words that don't fit your project requirements. For example, commercial keyword data might exclude queries with words like "free," "torrent," and similar modifiers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reducing words to their dictionary form (lemmatization) is optional&lt;/strong&gt;. Modern models understand different forms of the same word and equivalent phrases well. For instance, they can recognize that "buy iPhone" and "I want to buy an iPhone" are basically the same query. So there's no need to deliberately change words before processing. That said, simple preprocessing can help you spot similar queries and cut down the amount of data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The end result should be a clean, filtered set of unique queries without obvious technical noise. From there, the data can move on to the next stage—turning text into vector representations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vectorizing search queries
&lt;/h2&gt;

&lt;p&gt;Vector clustering is different from traditional string comparison. Instead of matching exact words, it works with their semantic representations. Each search query gets converted into a numerical vector, an embedding, that encodes its meaning.&lt;/p&gt;

&lt;p&gt;This is done using specialized embedding models. The text is first split into tokens, and then the model generates a fixed-size vector. As a result, semantically similar queries end up closer to each other in vector space.&lt;/p&gt;

&lt;p&gt;For example, the phrases "buy iPhone 15" and "iPhone 15 Pro price" will have more similar vectors than "buy iPhone 15" and "Apple phone repair." That property is what makes it possible to use clustering algorithms to group queries together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Commercial solutions (OpenAI, Claude)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For vectorization, you can use both cloud APIs and local models. The choice depends on the amount of data, quality requirements, your available infrastructure, and the acceptable processing cost.&lt;/p&gt;

&lt;p&gt;Commercial APIs are convenient because they don't require you to deploy a model locally and let you get started quickly. The provider handles the infrastructure, model updates, and computational scaling for you.&lt;/p&gt;

&lt;p&gt;For small and medium-sized datasets, this is one of the simplest options. But once you're processing hundreds of thousands or millions of queries, you need to think about API costs, request limits, and throughput.&lt;/p&gt;

&lt;p&gt;On top of that, working with APIs requires a fault-tolerant architecture: things like bypassing API limits through multi-accounting, key rotation, and asynchronous requests via aiohttp.&lt;/p&gt;

&lt;p&gt;You can test how commercial neural networks handle your queries yourself using the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="c1"&gt;# Initialize the client
&lt;/span&gt;&lt;span class="n"&gt;client_ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="c1"&gt;# Our raw dataset
&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy iphone 15&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;iphone 15 pro price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;apple phone repair&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# 1. Vectorize queries through OpenAI
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client_ai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text-embedding-3-small&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# The result is a set of ready-made multidimensional vectors
&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;embedding&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Local models from the Hugging Face ecosystem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An alternative to commercial APIs is open embedding models that run locally. For example, for multilingual tasks, you can use jinaai/jina-embeddings-v3 or Alibaba-NLP/gte-multilingual-large, which do not incur per-generation costs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sentence_transformers&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SentenceTransformer&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;⏳ 1. Loading stable BGE-m3 model...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;SentenceTransformer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;BAAI/bge-m3&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;queries&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy iphone 15&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;iphone 15 pro price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;apple phone repair&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;⏳ 2. Vectorizing &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; queries...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;embeddings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;normalize_embeddings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;✅ Done! Let&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s look at the result:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;📊 Data dimensions: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shape&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🔍 Vector for the phrase &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;buy iphone 15&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;vector_preview&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;float&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][:&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;🔢 &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;vector_preview&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; ... and &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; more numbers.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main advantage of local models is that the entire processing pipeline stays within your own infrastructure. You process search queries without sending them off to a third-party API, and once the model is loaded, you can vectorize them without paying for each individual request.&lt;/p&gt;

&lt;p&gt;Working with local models is often more cost-effective: they let you handle vectorization without paying for every API call. At the same time, they take up a fair amount of disk space. Along with model weights and cache, they can eat up several gigabytes. If you no longer need a model, it's a good idea to delete its local files and clear the cache once you're done working with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Storing and searching vector representations
&lt;/h2&gt;

&lt;p&gt;After vectorization, each search query is represented as an embedding vector. The next question is where to store this data and how to efficiently find semantically similar queries.&lt;/p&gt;

&lt;p&gt;For small datasets, vectors can stay in memory, for example, in NumPy arrays or Pandas structures. If you're only dealing with a few thousand queries, that's usually enough for experiments and local processing.&lt;/p&gt;

&lt;p&gt;As the dataset grows, things change. If every vector gets compared directly against all the others, the number of operations grows quadratically. For tens or hundreds of thousands of queries, this quickly becomes resource-intensive in terms of both computation time and memory usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vector databases&lt;/strong&gt; solve this problem. They're optimized specifically for these kinds of tasks and support approximate nearest-neighbor search algorithms (HNSW in particular). Built-in indexes let you avoid comparing every vector against every other vector directly, and they deliver near-instant searches for the most similar phrases even across millions of records.&lt;/p&gt;

&lt;p&gt;There are several popular solutions for this: &lt;strong&gt;Pinecone, Qdrant, PostgreSQL with the pgvector extension&lt;/strong&gt;, and others. In our example, we'll use &lt;strong&gt;ChromaDB&lt;/strong&gt;. It's well suited for local experiments: it runs without a separate server, stores data on disk, and integrates easily with Python code.&lt;/p&gt;

&lt;p&gt;Let's save the embeddings we got from the previous stage and check how semantic search works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;chromadb&lt;/span&gt;

&lt;span class="c1"&gt;# 1. Initialize the local database (creates the semantic_db folder)
&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chromadb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PersistentClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./semantic_db&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Create the collection
&lt;/span&gt;&lt;span class="n"&gt;collection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_or_create_collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search_queries&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hnsw:space&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cosine&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 3. Load our vectors and query texts
&lt;/span&gt;&lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tolist&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="c1"&gt;# vectors from our local BGE-m3 model
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;ids&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id_1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id_2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id_3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✅ Data saved to the database!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# ==========================================
# SEARCH MAGIC: let's check how the database understands meaning
# ==========================================
&lt;/span&gt;&lt;span class="n"&gt;test_phrase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;how much does the new iphone cost&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Searching the database for the phrase: &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;test_phrase&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;'"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Convert the test phrase into a vector using the same model
&lt;/span&gt;&lt;span class="n"&gt;test_embedding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;test_phrase&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;normalize_embeddings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Ask the database to find the two most similar options
&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;query_embeddings&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;test_embedding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;tolist&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;n_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Closest query: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;documents&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; (Distance: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;distances&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Second closest: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;documents&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; (Distance: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;distances&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Choosing a clustering algorithm
&lt;/h2&gt;

&lt;p&gt;Once you've got your embedding vectors, you can move on to the next stage—grouping search queries. At this point, it's important to pick an algorithm that fits the structure of your data and doesn't force overly rigid assumptions about the number of clusters you'll end up with.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why K-Means is not always suitable for SEO clustering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;K-Means&lt;/strong&gt; is a classic clustering algorithm that splits data into a predefined number of groups. You set that number with the &lt;code&gt;k&lt;/code&gt; parameter.&lt;/p&gt;

&lt;p&gt;For example, if you have 10,000 search queries and set &lt;code&gt;k=500&lt;/code&gt;, the algorithm will create 500 centroids and assign each query to the nearest one in vector space.&lt;/p&gt;

&lt;p&gt;The main limitation here is that you have to decide on the number of clusters in advance. That's not always convenient when you're building a keyword map: before you start processing, it's hard to know how many independent intent groups your dataset actually contains—50, 500, or 1,200.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;k&lt;/code&gt; is chosen poorly, related queries might end up split across several groups. The opposite can happen too: queries that are close in topic but differ in intent may get merged simply because the algorithm has to produce the specified number of clusters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Clustering with DBSCAN&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the number of groups isn't known in advance, you can turn to density-based clustering algorithms. One of the best-known options is &lt;strong&gt;DBSCAN&lt;/strong&gt; (Density-Based Spatial Clustering of Applications with Noise).&lt;/p&gt;

&lt;p&gt;Unlike K-Means, DBSCAN doesn't require you to specify the number of clusters upfront. Instead, the algorithm looks for regions in vector space where objects are packed closely enough together and forms groups from them.&lt;/p&gt;

&lt;p&gt;DBSCAN's behavior is driven by two main parameters:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;eps&lt;/code&gt; (epsilon/distance): the maximum distance between points for them to count as neighbors. In our case, that's the cosine-similarity threshold of the vectors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;min_samples&lt;/code&gt;: the minimum number of neighbors needed to form a full cluster.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;DBSCAN starts with the first random query. If there are &lt;code&gt;min_samples&lt;/code&gt; other queries within an &lt;code&gt;eps&lt;/code&gt; radius of it, a cluster core forms. The algorithm then expands outward in all directions, pulling in new neighbors until the density runs out.&lt;/p&gt;

&lt;p&gt;You can roughly think of the &lt;code&gt;eps&lt;/code&gt; parameter as how strict the clustering is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A smaller &lt;code&gt;eps&lt;/code&gt; means stricter grouping. Only queries with very similar vector representations land in the same cluster, so you usually get more groups, and they're more compact.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A larger &lt;code&gt;eps&lt;/code&gt; loosens the merging conditions. Clusters get bigger and may cover broader semantics, but the risk of mixing queries with different intents goes up too.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Another handy property of DBSCAN is its ability to flag &lt;strong&gt;noise&lt;/strong&gt;. If a query isn't in a sufficiently dense region of vector space, the algorithm doesn't try to force it into an existing cluster. Instead, it marks the query as an &lt;strong&gt;Outlier&lt;/strong&gt;. You can export these queries to a separate file for manual review rather than compromising otherwise clean landing pages.&lt;/p&gt;

&lt;p&gt;That said, DBSCAN is sensitive to the choice of &lt;code&gt;eps&lt;/code&gt;: a single threshold doesn't always work well when some groups in your data are very dense and others are much sparser.&lt;/p&gt;

&lt;p&gt;In those cases, consider &lt;strong&gt;HDBSCAN&lt;/strong&gt;, a hierarchical extension of the density-based approach. It can find clusters with different densities, automatically adapting the &lt;code&gt;eps&lt;/code&gt; parameter where queries are more tightly packed or, conversely, more spread out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The clustering script&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s extract our vectors from the local ChromaDB database and run them through DBSCAN using the &lt;code&gt;scikit-learn&lt;/code&gt; library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;chromadb&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;numpy&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;sklearn.cluster&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;DBSCAN&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;⏳ 1. Connecting to the vector database...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;chromadb&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PersistentClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;./semantic_db&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Extract the collection with the vectors (use your own name)
&lt;/span&gt;&lt;span class="n"&gt;collection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search_queries&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 

&lt;span class="c1"&gt;# Extract all query texts and their mathematical vectors
&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;documents&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;embeddings&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="n"&gt;documents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;documents&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;embeddings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;np&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;embeddings&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;✅ Queries extracted from the database: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# ==========================================
# CLUSTERING (DBSCAN)
# ==========================================
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;⏳ 2. Starting the DBSCAN algorithm...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# SETTINGS:
# eps = 0.15 (Allowed cosine distance. The smaller it is, the stricter the clusters);
# min_samples = 2 (Minimum of 2 queries to create a group);
# metric="cosine" (We explicitly specify that we measure angles between vectors, not linear distance).
&lt;/span&gt;&lt;span class="n"&gt;dbscan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DBSCAN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;eps&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;min_samples&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;metric&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cosine&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Run the grouping
&lt;/span&gt;&lt;span class="n"&gt;labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dbscan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fit_predict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;embeddings&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# ==========================================
# OUTPUT RESULTS
# ==========================================
# The algorithm assigned each query a group number (0, 1, 2...). 
# If a query is recognized as noise (Outlier), it receives the label -1.
&lt;/span&gt;
&lt;span class="n"&gt;clusters&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="n"&gt;outliers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;zip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;outliers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;=== GROUPING RESULTS ===&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;cluster_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;docs&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt; Cluster #&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cluster_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; (Queries: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;docs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;docs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;nbsp; - &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;outliers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt; Outliers/Noise (Queries: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;outliers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;outliers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;nbsp; - &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The example above uses a local model, but when working with commercial embedding models, the &lt;code&gt;eps&lt;/code&gt; value may require additional tuning. In particular, a threshold of &lt;code&gt;0.15&lt;/code&gt; that works for one model may, with another configuration, cause a significant portion of the queries to merge into one large cluster or be incorrectly classified as noise.&lt;/p&gt;

&lt;p&gt;Therefore, whenever you switch models, you should tune &lt;code&gt;eps&lt;/code&gt; separately based on the distribution of distances between vectors and the actual quality of the resulting groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hybrid clustering for separating search intents&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Clustering can be done with embeddings alone, but in practice that's often not enough. Semantic similarity doesn't always mean the search intent is the same.&lt;/p&gt;

&lt;p&gt;Take the queries "buy an anti-detect browser" and "what is an anti-detect browser." They're very close in topic. The embedding model correctly recognizes that both phrases refer to the same object, so the distance between their vectors will be small. As a result, DBSCAN will most likely drop both into the same cluster.&lt;/p&gt;

&lt;p&gt;From an SEO standpoint, that's not what you want, because the intent differs. The first implies a commercial landing page, while the second calls for informational content.&lt;/p&gt;

&lt;p&gt;Let's demonstrate this with a small test dataset:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;queries&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Informational
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;what are antidetect browsers for&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;what is an antidetect browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;how antidetect browsers work&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;antidetect browsers comparison&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Commercial
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy an anti-detect browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy proxies for an anti-detect browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;anti-detect browser trial&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Download
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;download anti-detect browser octo browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;octo browser anti-detect browser download&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;octo anti-detect browser download&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Queries on a different topic
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ford everest 2024 review&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy used ford everest&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Noise
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;weather in pattaya in May&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tom yum soup recipe&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When clustering only by vector similarity, queries related to anti-detect browsers may end up in the same group despite differences in intent.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F461cctt32y7aerozftgx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F461cctt32y7aerozftgx.jpg" alt="Regular clusteting results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this stage, the anti-detect browser becomes part of the pipeline once again—but not for collecting semantic data. This time, it's used to collect SERP data. For each query, you need to pull the search results, then use URL overlaps as an additional clustering signal.&lt;/p&gt;

&lt;p&gt;When you're dealing with a large number of queries, it helps to distribute this collection across isolated browser profiles—for example, by pairing Octo Browser with Playwright or Puppeteer.&lt;/p&gt;

&lt;p&gt;For each query, grab the top 10 URLs from the search results. Then, before running DBSCAN, compare the results for semantically similar phrases. If two queries share no URLs, or the overlap falls below a set threshold, the distance between their corresponding vectors gets artificially increased.&lt;/p&gt;

&lt;p&gt;So embeddings are used to find semantically similar queries, while the SERP analysis acts as an extra constraint and helps keep phrases with different search intents from being merged.&lt;/p&gt;

&lt;p&gt;Once you add the search-result data, the test dataset we discussed earlier gets distributed differently:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flqphd79x1006b7qogt63.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flqphd79x1006b7qogt63.jpg" alt="clustering results after adding search-result data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The number of clusters increases, and the groups themselves better match the intended search intent of the queries.&lt;/p&gt;

&lt;h2&gt;
  
  
  Post-processing results and updating data
&lt;/h2&gt;

&lt;p&gt;After forming the clusters, there is one more practical task—assigning a clear name to each group. Numbers such as “Cluster #42” are convenient for an algorithm but tell an SEO specialist, editor, or content writer very little.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic cluster naming with an LLM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you're doing clustering manually, a specialist has to review the contents of each group, figure out the primary intent, and come up with a name for the future page or piece of content. If you've got several hundred clusters, this stage eats up a serious amount of time.&lt;/p&gt;

&lt;p&gt;That said, this part of the process can be automated with an LLM. The model gets a list of queries from one cluster, determines the overall intent, and generates an appropriate heading. You can use either cloud-based models or local solutions like Ollama.&lt;/p&gt;

&lt;p&gt;It's important to define a strict output format upfront. If you just ask the model to come up with a name, you may get extra explanations and comments alongside the heading. That's why it's better to spell out explicitly in the system prompt that the output should contain only the heading and nothing else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="c1"&gt;# 1. INITIALIZATION AND KEY
# Insert your actual API key here
&lt;/span&gt;&lt;span class="n"&gt;client_ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sk-YOUR_OPENAI_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 2. OUR DATA (Result of hybrid clustering)
&lt;/span&gt;&lt;span class="n"&gt;clusters&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
 &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;what are anti-detect browsers for&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;what is an anti-detect browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;how anti-detect browsers work&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;anti-detect browsers comparison&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy an anti-detect browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;buy proxies for an anti-detect browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;anti-detect browser trial&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;download anti-detect browser octo browser&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;octo browser anti-detect browser download&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;octo anti-detect browser download&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# System prompt (set rules for the model)
&lt;/span&gt;&lt;span class="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;You are an expert SEO specialist. Analyze the following cluster of search queries. Determine the primary user intent and generate one highly relevant H1 title for a future category page or article. Return ONLY the title, without any additional text, quotes or explanations.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;⏳ Sending clusters to GPT-4o-mini for automatic naming...&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 3. Iterate through all clusters
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;cluster_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;queries&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;clusters&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Send the queries from the current cluster to the API
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client_ai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt; &lt;span class="c1"&gt;# Combine the queries into a single text
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.3&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Get the response
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="n"&gt;h1_title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; 
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="c1"&gt;# Print the result to the console
&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cluster #&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;cluster_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Phrases: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;, &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;queries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generated H1: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;h1_title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the test dataset, the result might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cluster #0
 &amp;nbsp; Phrases: what are anti-detect browsers for, what is an anti-detect browser, how anti-detect browsers work
 &amp;nbsp; Generated H1: What are anti-detect browsers used for

Cluster #1
 &amp;nbsp; Phrases: buy an anti-detect browser, buy proxies for an anti-detect browser, anti-detect browser trial
 &amp;nbsp; Generated H1: Best anti-detect browsers and proxies for safe browsing

Cluster #2
 &amp;nbsp; Phrases: download anti-detect browser octo browser, octo browser anti-detect browser download, octo anti-detect browser download
 &amp;nbsp; Generated H1: Download anti-detect browser Octo Browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a real project, the number of clusters will be much larger, so storing the source data directly in the code isn't practical. Usually, clusters get loaded from a file or database, and the generated names are written back to the table for further work.&lt;/p&gt;

&lt;p&gt;At this stage, the LLM isn't involved in the clustering itself. It's only used to post-process groups that have already been formed. This automates the routine part of the work and gives you a clear keyword set without having to manually name every cluster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adding new queries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another advantage of storing embeddings in &lt;strong&gt;ChromaDB&lt;/strong&gt; is that you can work with new data without manually running a nearest-neighbor search across the entire dataset again.&lt;/p&gt;

&lt;p&gt;Once you get a new batch of semantic data, the queries go through the same pipeline: cleaning, vectorization, and adding them to ChromaDB. For each new embedding, you can find the nearest existing queries and check the distance to them.&lt;/p&gt;

&lt;p&gt;If the nearest neighbors belong to a stable existing cluster and meet your defined similarity threshold, the new query can be added to that group. If no suitable cluster turns up, the query stays a candidate for forming a new group or gets sent for additional processing.&lt;/p&gt;

&lt;p&gt;This approach lets you use the accumulated vector database as an index for handling new queries, so you avoid running a full pairwise search across the entire keyword set every time it gets updated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Building your own pipeline based on embedding models, vector storage, and clustering algorithms takes time. You have to set it up, test it, and tune it. But once that's done, you end up with a system you can adapt to a specific topic, data volume, and project requirements.&lt;/p&gt;

&lt;p&gt;The main advantages of this approach are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced dependence on specialized services&lt;/strong&gt;. You don't need a separate SEO service with fixed plans and volume limits for clustering. The main limitations shift to your own infrastructure: compute resources, memory, and disk space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Control over clustering logic&lt;/strong&gt;. You can pick the embedding model yourself, configure &lt;code&gt;eps&lt;/code&gt;, use SERP data, and change the rules for combining queries depending on the task.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Control over the data&lt;/strong&gt;. When you use local models and local storage, your keyword data stays within your own infrastructure and isn't sent to third-party APIs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main value of this approach isn't completely replacing ready-made SEO tools. Rather, it's the ability to build your own controllable pipeline. Use Octo Browser to automate semantic and SERP data scraping, and handle the rest of the processing locally with embeddings, ChromaDB, and clustering algorithms.&lt;/p&gt;

&lt;p&gt;Once you build this process and carefully tune it on real data, it becomes more than a one-off script. It turns into a working tool you can reuse and scale as your keyword set grows.&lt;/p&gt;

</description>
      <category>python</category>
      <category>seo</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Behavioral analysis: what it is and how automation specialists can bypass it</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Thu, 27 Aug 2026 12:11:33 +0000</pubDate>
      <link>https://dev.to/octobrowser/behavioral-analysis-what-it-is-and-how-automation-specialists-can-bypass-it-1co6</link>
      <guid>https://dev.to/octobrowser/behavioral-analysis-what-it-is-and-how-automation-specialists-can-bypass-it-1co6</guid>
      <description>&lt;p&gt;Not long ago, anti-fraud systems mostly relied on technical signals such as IP addresses, cookies, and browser fingerprints. As scripts and scrapers became better at spoofing these attributes, security systems started paying much more attention to how users actually interact with websites.&lt;/p&gt;

&lt;p&gt;Behavioral biometrics focuses on the way a person interacts with an interface — from mouse movements and scrolling to typing patterns. Today, it is becoming an increasingly important part of detecting automated activity.&lt;/p&gt;

&lt;p&gt;In this article, we’ll look at how behavioral analysis works and what makes automated interactions appear more human-like.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why CAPTCHAs are giving way to behavioral analysis
&lt;/h2&gt;

&lt;p&gt;In the past, CAPTCHA was one of the main tools used to keep bots away. It is still widely used, but the technology has evolved considerably. Modern systems are more advanced, and some invisible solutions, such as reCAPTCHA v3, rely partly on the same behavioral signals discussed in this article.&lt;/p&gt;

&lt;p&gt;Why is this necessary? Traditional CAPTCHAs (traffic lights and distorted characters) worsen the user experience and are increasingly being solved effortlessly by trained neural networks. The new approach, which works without visible elements, removes much of the burden from users and avoids annoying them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F63s0u848ryyri68lh1jr.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F63s0u848ryyri68lh1jr.jpeg" alt="reCAPTCHA biometrics" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Behavioral biometrics is an important part of this invisible verification process because it allows systems to continuously evaluate user activity. It looks at how a person interacts with a device while scrolling through a page, filling out a form, or performing other actions. All of this can happen without requiring any additional input from the user.&lt;/p&gt;

&lt;p&gt;There is one important point to keep in mind. Behavioral biometrics is not used as the only method of verification. It works together with other checks. Anti-fraud systems can also evaluate digital fingerprints, IP reputation, cookies, and other signals to determine whether activity is legitimate or automated.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of behavioral biometrics
&lt;/h2&gt;

&lt;p&gt;Let’s take a closer look at the theory. Behavioral patterns can be seen as a digital representation of how a person interacts with a device. Modern anti-fraud systems do not look at each parameter in isolation. Instead, they combine multiple signals to create a broader behavioral profile, which can be divided into the following categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Device interaction (kinesthetics)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the largest layer of data for the traditional web and mobile applications. Here, systems analyze the physics of user movements.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Keyboard:&lt;/strong&gt; it’s not about which letters or numbers you type. Anti-fraud systems evaluate two main parameters: how long a key is held down (dwell time) and how long it takes to move between keys (flight time). Humans have muscle memory — familiar key combinations (for example, common word endings) are typed in micro-bursts. Bots, meanwhile, either inject entire strings at once or imitate typing using simplistic time.sleep(random) logic. This creates a flat, unnatural delay distribution. Randomness itself becomes suspicious.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mouse:&lt;/strong&gt; cursor analytics. The system records coordinates and calculates speed, acceleration, trajectory curvature, and jerks. Humans do not move a mouse in perfectly straight lines. We aim for a button, miss by a few pixels, make tiny corrective movements, and briefly pause before clicking.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fifskem9180haoylz0sl0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fifskem9180haoylz0sl0.jpeg" alt="simulating mouse tremor" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Touchscreen:&lt;/strong&gt; specific for mobile web and native applications. A human swipe is an arc with uneven speed, specific pressure (if the API allows pressure detection), and a changing finger contact area. Bots that emulate touch events through Appium or JavaScript scripts often simply “teleport” focus coordinates. Writing the proper math for a realistic swipe is more difficult, so bot operators often cut corners.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Physical patterns (biomechanics)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When someone accesses a platform from a mobile device, its hardware sensors provide additional signals. This is especially relevant today because a large share of web traffic comes from mobile users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Walking patterns and micromovements.&lt;/strong&gt; Are they browsing while walking, sitting at a desk, or relaxing on a couch? The smartphone’s accelerometer and gyroscope can detect small changes in how the device moves. A real phone rarely stays completely still in someone’s hands, even when the person is trying to keep it steady. Server based bot farms and emulators often lack this natural sensor noise, which can give anti-fraud systems another reason to assign a higher risk score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cognitive patterns (interaction psychology)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where systems focus on how users behave while interacting with an interface.&lt;/p&gt;

&lt;p&gt;Navigation and decision-making speed. How long does it take a user to find the right button? Do they read the text before selecting a checkbox? Real users often move the cursor around text as they read, pause when dealing with a complex form, or even select parts of the text. A scraper script behaves differently. It already knows the DOM structure and can trigger the required event after a fixed delay without going through the visual search and decision-making process.&lt;/p&gt;

&lt;p&gt;Together, these three levels create a detailed behavioral profile. Simply adding random delays to Selenium or Puppeteer scripts is not enough to reproduce this kind of behavior reliably.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data collection and preprocessing
&lt;/h2&gt;

&lt;p&gt;The primary sources for collecting biometric data are &lt;code&gt;mousemove&lt;/code&gt;, &lt;code&gt;keydown&lt;/code&gt;, &lt;code&gt;keyup&lt;/code&gt;, &lt;code&gt;touchstart&lt;/code&gt;, and &lt;code&gt;touchend&lt;/code&gt; events, as well as the &lt;code&gt;DeviceOrientation&lt;/code&gt; API for capturing accelerometer and gyroscope readings.&lt;/p&gt;

&lt;p&gt;The most difficult part at this stage is handling the enormous volume of fragmented and asynchronous data. A single &lt;code&gt;mousemove&lt;/code&gt; event alone can fire hundreds of times per second. If every cursor movement triggered backend processing or heavy computations directly on the client side, the anti-fraud system would instantly freeze the UI and cause noticeable lag on the client’s website. No business would accept that.&lt;/p&gt;

&lt;p&gt;That is why client-side collection scripts are designed to be as lightweight and primitive as possible. Their only task is to quickly capture coordinates, attach precise timestamps, store everything in a local buffer, and send the data to the server in a batch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrv1fd7zvbui51apy6qx.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrv1fd7zvbui51apy6qx.jpeg" alt="biometric data collection" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These batches of JSON objects are then transmitted to the backend. In high-load systems, they are not written directly into databases or immediately passed to ML models. First, they are routed through message brokers such as Kafka or RabbitMQ. This is necessary to smooth out traffic spikes, for example, during large-scale bot attacks or natural surges of real users during sales or promotions. At this point, the client-side responsibility ends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feature engineering and ML models&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, the raw batches have reached the server. What happens next?&lt;/p&gt;

&lt;p&gt;If you send this array of pixels directly to an ML model, it will not learn to tell humans from bots. Instead, it will mostly memorize the location of buttons and other elements on a particular website. A small change in the layout could then make the model ineffective. What machine learning needs is not information about screen layout, but more general behavioral patterns.&lt;/p&gt;

&lt;p&gt;This is where the feature engineering layer comes in. It sits between the message queue and the ML models and prepares raw logs for further analysis. These pipelines are often built with Pandas and NumPy. They combine the collected data and convert it into features that machine learning models can process. Typical calculations include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Euclidean distances between points;&lt;/li&gt;
&lt;li&gt;time intervals between events;&lt;/li&gt;
&lt;li&gt;instantaneous movement speed;&lt;/li&gt;
&lt;li&gt;turning angles along a trajectory.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These calculations are then used to create a more detailed behavioral profile:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keyboard:&lt;/strong&gt; delay vectors such as &lt;code&gt;dwell time&lt;/code&gt; and &lt;code&gt;flight time&lt;/code&gt;, together with their median, variance, and standard deviation. This shows how consistent the user's typing rhythm is.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mouse:&lt;/strong&gt; speed and acceleration statistics, the number of short pauses, and the spectral entropy of the trajectory. This helps describe whether the movement looks more irregular or follows a highly predictable pattern.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Touchscreen:&lt;/strong&gt; changes in pressure and contact area during a swipe, when this information is available through the browser or operating system API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cognitive features:&lt;/strong&gt; &lt;code&gt;idle time&lt;/code&gt; and the delays before focusing on specific elements. For example, a user may pause before clicking the “Pay” button while checking the amount.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A single session can produce hundreds of these parameters. They are extracted without relying on the specific page layout and then passed to the ML models for further analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classical ML algorithms (Random Forest, SVM, Gradient Boosting)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These models work especially well with aggregated statistical features. They are fast, require relatively few server resources, and are often used as the first layer of detection.&lt;/p&gt;

&lt;p&gt;The full set of session statistics, including action speed, timing variance, entropy, and other parameters, is passed through a trained model. This allows the system to quickly filter out obvious anomalies, such as no variation in cursor acceleration or unusually consistent intervals between clicks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Neural networks (LSTM, GRU, and 1D-CNN)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While classical algorithms mainly focus on the overall statistics of a session, neural networks can work directly with sequences of cursor movements over time.&lt;/p&gt;

&lt;p&gt;Recurrent networks are well suited to sequential data where the current element can depend on what happened before it. Their ability to retain context allows them to consider previous user actions and identify unusual patterns or rhythms that may disappear when the data is reduced to simple averages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autoencoders and anomaly detection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the main challenges for anti-fraud systems is that bot developers are constantly coming up with new ways to bypass detection. It is impossible to train a separate model for every possible type of automation. At the same time, systems have access to huge amounts of data describing how real users behave. This makes unsupervised learning, particularly autoencoders, useful for detecting unusual sessions.&lt;/p&gt;

&lt;p&gt;An autoencoder is trained primarily on data from real users. It takes session parameters as input, compresses them into a smaller representation, and then tries to reconstruct the original data.&lt;/p&gt;

&lt;p&gt;Because the model has mainly learned normal human behavior, it can reconstruct similar sessions relatively accurately. When it receives an unfamiliar automated pattern, the reconstruction may become less accurate.&lt;/p&gt;

&lt;p&gt;The difference between the original data and the reconstructed output is known as the reconstruction error. A larger error indicates that the observed behavior differs more significantly from the patterns learned by the model and can therefore contribute to a higher risk score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Single checks vs. hybrid systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using just one detection method is not enough, which is why modern anti-fraud systems typically combine several models. A common approach is a cascading architecture. Lightweight ML models quickly eliminate obvious automation, while more resource-intensive neural networks are used for sessions that cannot be classified confidently during the first stage.&lt;/p&gt;

&lt;p&gt;This approach helps improve detection accuracy while keeping computational costs under control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature drift and adaptation
&lt;/h2&gt;

&lt;p&gt;Human behavior can change over time, and the same is true for a device’s digital fingerprint. A user might replace their mouse with a model that has different DPI settings, switch from a desktop to a laptop with a touchpad, hurt their hand, drink a couple of espressos, or simply get tired toward the end of the day. Each of these factors can affect typing patterns, fine motor movements, and reaction times.&lt;/p&gt;

&lt;p&gt;If an anti-fraud model remains static and relies on a reference profile created years ago, it will eventually start flagging legitimate users. False positive rates will increase, conversion rates may decline, and businesses can lose both revenue and customer trust.&lt;/p&gt;

&lt;p&gt;For this reason, anti-fraud systems need to evolve with users and account for changes in their behavior and environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-time neural network training&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional batch training involves retraining a model periodically using a large accumulated dataset. Online learning takes a different approach by allowing the model to update its parameters continuously. When a legitimate session is confirmed, for example through a completed purchase or successful 2FA verification, its data can be used to gradually update the model. This helps the system adapt to long-term changes in user behavior.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sliding memory window&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another approach is the sliding memory window. New session data is continuously added to the behavioral profile and given more weight than older records. Over time, older sessions have less influence on the model until they become almost irrelevant. This means the system compares current activity with the user’s recent behavior rather than relying on a profile that was created when the account was first registered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statistical monitoring&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But how does the system distinguish between a legitimate change, such as buying a new mouse, and a sudden session spoofing by a sophisticated bot? For this purpose, strict statistical monitoring is applied, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Principal Component Analysis (PCA). This method projects dozens of features into a 2D or 3D space and tracks cluster drift. If fresh sessions suddenly deviate from the user’s historical behavioral core, the system detects the drift.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0puc04rkwel3f40vzg52.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0puc04rkwel3f40vzg52.jpeg" alt="PCA Analysis" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Statistical tests (such as the &lt;a href="https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test" rel="noopener noreferrer"&gt;Kolmogorov–Smirnov test&lt;/a&gt;). The algorithm continuously compares the distribution of new data against the reference distribution. If divergence between the two samples is detected, the system temporarily lowers trust in the profile. At this stage, the user is not banned but instead prompted to complete a CAPTCHA. If the verification is passed successfully, the model interprets the deviation as legitimate—for example, a switch to a new device—and updates the reference profile accordingly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Human behavior emulation
&lt;/h2&gt;

&lt;p&gt;Now that we have a basic understanding of how anti-fraud systems work, let’s look at how automated systems can be designed to produce more human-like behavior.&lt;/p&gt;

&lt;p&gt;Simply smoothing cursor movements with Bézier curves or adding time.sleep() delays is no longer enough. Modern ML models can pick up on automated patterns very quickly. A more realistic emulator needs to account for factors related to human physiology and biomechanics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jitter injection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you instruct a script to make random pauses lasting 80 to 120 milliseconds, it will generate 80 ms, 120 ms, and 95 ms delays with roughly the same frequency.&lt;/p&gt;

&lt;p&gt;Humans do not type like that. We each have a natural, comfortable rhythm that we fall into most of the time. Occasionally, our fingers speed up or slow down slightly. That is why delays should be generated according to a Gaussian distribution (a bell curve). The overwhelming majority of a bot’s pauses should cluster around a single baseline speed, while only a few deviations should significantly differ in either direction.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy7my4i1zqfqb3ac6ay4t.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy7my4i1zqfqb3ac6ay4t.jpeg" alt="human vs bot input delays" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tremor emulation&lt;/strong&gt;&lt;br&gt;
Imagine trying to quickly click a tiny checkbox. You move the mouse abruptly, overshoot the target by a couple of pixels, notice the mistake, and pull the cursor back.&lt;/p&gt;

&lt;p&gt;To imitate this effect and the natural shakiness of the human hand, developers blend mathematical functions (sine and cosine waves) into the ideal cursor trajectory. This creates realistic micro-noise capable of deceiving anti-fraud systems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Macro-pauses&lt;/strong&gt;&lt;br&gt;
One of the most advanced and rarely implemented techniques is the introduction of macro-pauses that imitate physiological cycles. Humans do not work continuously at a computer. We blink, temporarily losing visual contact with the screen, breathe in and out, glance down at the keyboard, or get distracted by our phones.&lt;/p&gt;

&lt;p&gt;An emulator must therefore include a “loss of focus” logic—periodic artificial delays of 1–3 seconds before important actions, breaking the machine-like monotony.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Behavior copying&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why build complex mathematical models to reproduce natural scrolling, deceleration, and small movements from scratch when you can work with real human interaction data instead? This approach is known as blending and takes behavioral emulation a step further.&lt;/p&gt;

&lt;p&gt;Advanced bot developers can build their own datasets or use existing ones. These datasets contain recordings of real user sessions, including how people scroll through feeds, move the cursor while reading, or make small unconscious mouse movements while thinking. The data can be stored as sequences of movement vectors combined with timing information.&lt;/p&gt;

&lt;p&gt;When a script based on this approach needs to scroll a page or move the cursor toward a complex form, it does not necessarily rely on simple commands such as &lt;code&gt;window.scrollBy()&lt;/code&gt; or predefined Bézier curves. Instead, it can select a suitable segment from a database of recorded interactions. The trajectory is then adjusted to match the current browser coordinates. The movement is transformed so that the cursor reaches the required element, after which the automated process continues with the intended action.&lt;/p&gt;

&lt;p&gt;From the perspective of an anti-fraud model, these movements can look much closer to genuine human activity because they are based on real interaction data. Natural variations, small movements, and timing patterns are already present in the original recordings.&lt;/p&gt;

&lt;p&gt;What’s the catch? Scaling this approach requires a large and diverse collection of behavioral data. Reusing the same interaction fragments across many profiles can make the pattern easier to identify. If identical sequences appear repeatedly, server-side systems may recognize them as replayed behavior and use that signal to flag the associated sessions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The vulnerability of loops&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;However much you randomize timings and shake the cursor, every bot suffers from one congenital weakness: it lives inside a programmatic loop (&lt;code&gt;while&lt;/code&gt; or &lt;code&gt;for&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Protection systems take your script’s timings and run them through spectral analysis (Fourier transform). This filters out the artificial random noise and reveals the hidden carrier frequency of the loop. Humans are naturally arrhythmic; bots are not.&lt;/p&gt;

&lt;p&gt;Can you defeat Fourier analysis and convince the server that your script is a living human with no detectable base frequency? Yes, but doing so requires rewriting the entire architecture of your scraper. A simple &lt;code&gt;Math.random()&lt;/code&gt; is nowhere near enough for this.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Abandoning loops in favor of State Machines. Do not use linear &lt;code&gt;while&lt;/code&gt; or &lt;code&gt;for&lt;/code&gt; loops combined with nested &lt;code&gt;sleep()&lt;/code&gt; calls. Your bot should function as a finite-state machine driven by events. It should have multiple states, e.g., reading, hesitation or idling, movement, clicking. Transitions between these states should not be rigidly hardcoded but determined probabilistically. Only then will the overall rhythm of the session become unpredictable, like a human who may suddenly change their mind before clicking a button.&lt;/li&gt;
&lt;li&gt;The mathematics of “heavy tails.” Forget uniform randomness or even Gaussian distributions. Most of your pauses should be short and tightly clustered, but the bot should occasionally stop for an abnormally long time with a certain probability. These rare but extreme outliers are precisely what disrupt Fourier frequency analysis, smearing the spectrum and hiding the machine rhythm. &lt;/li&gt;
&lt;li&gt;Using OS entropy. The built-in pseudorandom number generators in JavaScript or Python have predictable patterns of their own. Instead, you can draw true entropy directly from the operating system, which gathers chaotic hardware noise, from CPU temperature fluctuations to network interrupts.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion: the economics of scraping and the endless game
&lt;/h2&gt;

&lt;p&gt;Behavioral biometrics has not become a universal solution for stopping bots. However, it has changed both the rules of the game and the cost of building sophisticated automation.&lt;/p&gt;

&lt;p&gt;In the past, creating a scraper often required little more than a pool of proxies and a basic understanding of browser headers. Today, more advanced automation can require knowledge that goes beyond traditional web development and touches areas such as biomechanics and signal processing. This is mainly relevant to sophisticated projects, rather than simple tasks like scraping images from Google Maps.&lt;/p&gt;

&lt;p&gt;The competition between anti-fraud systems and bot developers is still ongoing, but the focus has shifted toward reproducing aspects of human behavior. Anti-fraud systems will continue to develop more advanced ways of identifying automated activity, while automation tools will continue trying to make their interactions look increasingly natural. &lt;/p&gt;

&lt;p&gt;If you want to try an anti-detect browser for your automation tasks, sign up on &lt;a href="https://octobrowser.net/" rel="noopener noreferrer"&gt;our website&lt;/a&gt; and use promo code &lt;strong&gt;DEVTO&lt;/strong&gt; to get 4 days of Starter subscription for free. &lt;/p&gt;

</description>
      <category>automation</category>
    </item>
    <item>
      <title>CDP Leaks in Puppeteer: How Sites Detect Automation</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Wed, 05 Aug 2026 09:15:07 +0000</pubDate>
      <link>https://dev.to/octobrowser/cdp-leaks-in-puppeteer-how-anti-fraud-systems-detect-automation-through-chrome-devtools-protocol-2djp</link>
      <guid>https://dev.to/octobrowser/cdp-leaks-in-puppeteer-how-anti-fraud-systems-detect-automation-through-chrome-devtools-protocol-2djp</guid>
      <description>&lt;p&gt;Among browser automation tools, Puppeteer has occupied a unique position for years. Compared with the more heavyweight Selenium ecosystem, it provides developers with direct, high-performance control over Chromium right out of the box, all within the Node.js environment.&lt;/p&gt;

&lt;p&gt;Puppeteer has become something of an industry standard, largely thanks to its huge ecosystem of ready-to-use plugins and its close integration with the V8 engine. In practice, you can combine Puppeteer with &lt;code&gt;puppeteer-extra-plugin-stealth&lt;/code&gt;, invest in high-quality proxies, and carefully spoof &lt;a href="https://dev.to/octobrowser/canvas-audio-and-webgl-analysis-of-fingerprinting-technologies-23e"&gt;Canvas and WebGL fingerprints&lt;/a&gt;. For many use cases, this combination can be enough.&lt;/p&gt;

&lt;p&gt;The situation changes, however, when you are dealing with websites protected by more &lt;a href="https://dev.to/octobrowser/how-next-generation-captchas-work-and-why-it-matters-for-automation-2oe1"&gt;advanced anti-bot systems&lt;/a&gt;. A scraper that works perfectly on less protected targets can still find itself blocked by services such as Cloudflare, Akamai, or DataDome.&lt;/p&gt;

&lt;p&gt;The issue isn't necessarily related to your scraper's logic or the quality of the proxies you're using. Instead, the source of the problem can be found in one of the core technologies that makes Puppeteer so powerful and convenient: the Chrome DevTools Protocol (CDP).&lt;/p&gt;

&lt;p&gt;This low-level browser control protocol can leave behind distinctive digital traces. Modern anti-fraud and bot-detection systems can analyze these signals and use them to distinguish automated browsers from genuine users.&lt;/p&gt;

&lt;p&gt;So, where exactly do these leaks come from?&lt;/p&gt;

&lt;p&gt;Let's take a closer look at how these signals are exposed and why simple spoofing techniques applied to a standard Puppeteer setup are no longer always enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  How WebSocket can turn into a local scanner
&lt;/h2&gt;

&lt;p&gt;First, let's cover some basics. &lt;strong&gt;WebSocket&lt;/strong&gt; is a TCP-based communication protocol designed to support real-time data exchange between a client and a server.&lt;/p&gt;

&lt;p&gt;It was originally developed for use cases such as low-latency browser games and real-time features like typing indicators in chat applications. However, anti-fraud developers soon recognized another possibility: if a browser is capable of opening a socket connection to a remote server, there is usually nothing stopping it from trying to connect to services running on the user's local machine as well.&lt;/p&gt;

&lt;p&gt;The process is fairly straightforward. Once the target website loads—or after a user logs in—a hidden anti-fraud script can start making connection attempts asynchronously. It doesn't need to check every port on the machine. Instead, it can probe &lt;code&gt;127.0.0.1&lt;/code&gt; against a predefined set of ports, including &lt;strong&gt;9222&lt;/strong&gt;, which is commonly associated with CDP, as well as ports frequently used by local VPN clients and database servers.&lt;/p&gt;

&lt;p&gt;This simple technique is enough to find what the script is looking for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why browsers allow this
&lt;/h2&gt;

&lt;p&gt;Modern browsers and operating systems have two architectural characteristics that make this possible.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bypassing strict CORS restrictions.&lt;/strong&gt; If an anti-fraud script tried to scan ports using a regular HTTP request (&lt;code&gt;fetch()&lt;/code&gt; or &lt;code&gt;XMLHttpRequest&lt;/code&gt;), the browser would block access to the response because of its security measures, same-origin policy, CORS restrictions, and mixed content rules. WebSockets work differently. The protocol does not use the traditional CORS model to restrict access to responses. Instead, it sends an &lt;code&gt;Origin&lt;/code&gt; header, which the server may choose to validate. Simply determining whether a connection succeeds or fails already provides valuable information for analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The firewall's blind spot.&lt;/strong&gt; The &lt;code&gt;loopback&lt;/code&gt; interface (&lt;strong&gt;127.0.0.1&lt;/strong&gt;) enjoys an exceptionally high level of trust within the operating system, as the traffic sent from the browser to a local port never leaves your network interface.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Built-in firewalls on systems such as Windows and macOS generally don't inspect or filter these internal connections in the same way they would external network traffic. They are typically treated as inherently trusted.&lt;/p&gt;

&lt;p&gt;This effectively gives anti-fraud systems a legitimate and largely unrestricted way to probe parts of the local environment.&lt;/p&gt;

&lt;p&gt;But there is still an obvious question: if browser security prevents a script from directly reading system-level responses, how can it determine whether a particular port is actually open?&lt;/p&gt;

&lt;p&gt;The answer lies in &lt;strong&gt;timing attacks&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How a timing attack works
&lt;/h2&gt;

&lt;p&gt;The browser sandbox places strict limits on what scripts are allowed to access. Because of the Same-Origin Policy (SOP) and CORS restrictions, a script cannot simply inspect a response from a local service or retrieve the exact error code generated when a connection fails. For a timing attack, however, that information isn't necessary.&lt;/p&gt;

&lt;p&gt;The process works like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The script starts an internal timer (typically using &lt;code&gt;performance.now()&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;It initiates a WebSocket connection: &lt;code&gt;new WebSocket('ws://127.0.0.1:9222')&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The script waits for the &lt;code&gt;onerror&lt;/code&gt; event to fire.&lt;/li&gt;
&lt;li&gt;Once the error occurs, the timer stops, and the elapsed time is calculated.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The important part is what happens inside the operating system's network stack when it receives the connection attempt.&lt;/p&gt;

&lt;h3&gt;
  
  
  When the port is closed
&lt;/h3&gt;

&lt;p&gt;The operating system immediately rejects the incoming SYN packet by returning a TCP RST packet. The browser then closes the socket and triggers the &lt;code&gt;onerror&lt;/code&gt; handler. On a local machine, the entire process will typically take only around &lt;strong&gt;1–5 milliseconds&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  When the port is open
&lt;/h3&gt;

&lt;p&gt;The connection first completes the standard TCP three-way handshake. The browser then sends an HTTP Upgrade request to negotiate a WebSocket connection. Even when the service listening on that port isn't actually a WebSocket server—for example, a database or SSH service—the connection generally isn't rejected immediately. It can fail only after the protocol mismatch is detected. The extra handshake and data exchange increase the response time to roughly &lt;strong&gt;10–50 milliseconds&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  When a firewall filters the port
&lt;/h3&gt;

&lt;p&gt;Instead of rejecting the SYN packet, the firewall silently drops it. The browser receives no response from the operating system and continues waiting until the connection attempt eventually times out. Here, the delay is &lt;strong&gt;measured in seconds rather than milliseconds&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Modern browsers deliberately reduce the precision of JavaScript timers, typically bringing it down to approximately &lt;strong&gt;0.1–1 ms&lt;/strong&gt;. But timing attacks don't require nanosecond-level precision.&lt;/p&gt;

&lt;p&gt;The difference between an immediate &lt;code&gt;TCP RST&lt;/code&gt; and a slower connection attempt can be measured in tens of milliseconds, which is more than enough to distinguish the two cases reliably.&lt;/p&gt;

&lt;p&gt;More sophisticated anti-fraud systems also account for variables such as CPU utilization, JavaScript garbage collection, and operating-system behavior. As a result, they don't necessarily depend on fixed, hardcoded timing thresholds.&lt;/p&gt;

&lt;p&gt;Instead, the script can calibrate itself first.&lt;/p&gt;

&lt;p&gt;Before checking the ports it is actually interested in, it can make a connection attempt to a random, high-numbered port that is expected to be closed. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ws://127.0.0.1:54321
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The resulting response time provides a baseline for what a closed port looks like on that particular machine at that particular moment.&lt;/p&gt;

&lt;p&gt;The system can then compare the timing measurements from ports commonly associated with multi-accounting tools against this baseline and look for unusual deviations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why anti-fraud systems care about your localhost
&lt;/h2&gt;

&lt;p&gt;The primary objective of an anti-fraud system is to deanonymize browser profiles and detect multi-accounting.&lt;/p&gt;

&lt;p&gt;Most anti-detect solutions focus heavily on spoofing &lt;a href="https://dev.to/octobrowser/how-browser-fingerprinting-works-3f87"&gt;browser fingerprints&lt;/a&gt;—Canvas, WebGL, fonts, and similar signals—while paying far less attention to the network stack.&lt;/p&gt;

&lt;p&gt;Open local ports associated with automation tools become highly reliable indicators that a digital identity has been spoofed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What scoring algorithms look for
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Indicator&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Port 9222&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Standard CDP debugging port&lt;/td&gt;
&lt;td&gt;An open port strongly suggests an actively automated browser.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Port 22&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;SSH service&lt;/td&gt;
&lt;td&gt;Often associated with proxy tunnels or rented remote servers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Port 3306&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;MySQL database&lt;/td&gt;
&lt;td&gt;Reveals server environments that are highly unusual for ordinary home users.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Timing characteristics&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Response time differences&lt;/td&gt;
&lt;td&gt;Allows the system to distinguish between filtered traffic (delayed response) and genuinely closed ports (immediate rejection).&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The timing data collected within fractions of a second is sent to the anti-fraud scoring server.&lt;/p&gt;

&lt;p&gt;There, the observed port pattern is analyzed. Depending on the results, negative risk points may be added to your profile's overall score.&lt;/p&gt;

&lt;p&gt;If &lt;strong&gt;port 9222&lt;/strong&gt; is open, it's a strong indication that the browser is being controlled through the &lt;strong&gt;Chrome DevTools Protocol (CDP)&lt;/strong&gt; by automation frameworks such as Puppeteer, Playwright, or Selenium.&lt;/p&gt;

&lt;p&gt;At that point, mouse movement emulation or &lt;a href="https://dev.to/octobrowser/behavioral-analysis-what-it-is-and-how-automation-specialists-can-bypass-it-1co6"&gt;simulated human input&lt;/a&gt; is unlikely to help. The session may receive a very high risk score, resulting in anything from a CAPTCHA challenge to an outright account ban, depending on how aggressive the anti-fraud system is.&lt;/p&gt;

&lt;p&gt;Likewise, if ports such as &lt;strong&gt;22 (SSH), 3306 (MySQL)&lt;/strong&gt;, or ports commonly used by local proxy applications are open, it's difficult to pass as a typical user device.&lt;/p&gt;

&lt;p&gt;The anti-fraud system is likely to conclude that it's dealing with a virtual machine, a rented server, or a professional multi-accounting workstation, significantly reducing the trust assigned to the account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cross-linking and account farm detection
&lt;/h2&gt;

&lt;p&gt;This may be the biggest concern for anyone operating multiple accounts.&lt;/p&gt;

&lt;p&gt;Imagine that you're running 50 browser profiles on a single machine.&lt;/p&gt;

&lt;p&gt;Each profile has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a unique browser fingerprint;&lt;/li&gt;
&lt;li&gt;its own dedicated proxy;&lt;/li&gt;
&lt;li&gt;a different IP address.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the perspective of an external website, these profiles can appear to belong to 50 separate users. But underneath those browser sessions, the same operating system or server is still being used.&lt;/p&gt;

&lt;p&gt;As a result, the same background services remain active and expose the same collection of open ports. This particular combination can effectively act as a super fingerprint.&lt;/p&gt;

&lt;p&gt;An anti-fraud system may notice that dozens of supposedly unrelated users share the exact same—and potentially unusual—local service configuration. From there, it can correlate those profiles, identify them as belonging to a single account farm, and potentially shadow-ban the entire group.&lt;/p&gt;

&lt;p&gt;In other words, localhost scanning can allow anti-bot systems to look beyond the browser fingerprint itself and uncover the infrastructure sitting behind your multiple accounts.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to protect yourself: isolation and firewall configuration
&lt;/h2&gt;

&lt;p&gt;When dealing with sophisticated anti-fraud systems, your defensive strategy should focus on a few key principles.&lt;/p&gt;

&lt;h3&gt;
  
  
  Isolate the network stack
&lt;/h3&gt;

&lt;p&gt;Use virtual machines or containers with properly isolated network environments. When the browser operates inside a fully isolated environment, timing-based probes should only observe the response characteristics of ports available within that environment. Services running directly on the host become inaccessible from inside the isolated environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configure the firewall correctly
&lt;/h3&gt;

&lt;p&gt;A firewall shouldn't simply drop every connection attempt—it should reject unwanted connections immediately. In particular, use &lt;strong&gt;REJECT&lt;/strong&gt;, which immediately returns a &lt;strong&gt;TCP RST&lt;/strong&gt; packet, rather than &lt;strong&gt;DROP&lt;/strong&gt;, which silently discards packets and makes the browser wait for a timeout.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;REJECT&lt;/strong&gt; response behaves more like a naturally closed port and therefore produces timing characteristics that are less distinctive for timing-based detection.&lt;/p&gt;

&lt;h3&gt;
  
  
  Block localhost access entirely
&lt;/h3&gt;

&lt;p&gt;The most aggressive—and potentially most effective—option is to prevent the browser from accessing localhost altogether. This can neutralize anti-fraud scripts that attempt to probe services running on the local machine.&lt;/p&gt;

&lt;p&gt;There is a drawback, though. Some legitimate applications, including software used with hardware security keys or e-signature tools, rely on local agents to communicate with the browser. Preventing that communication can itself look unusual and potentially contribute to a higher risk score.&lt;/p&gt;

&lt;p&gt;Therefore, there are two practical approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fine-grained filtering.&lt;/strong&gt; Allow access only to trusted local services at the firewall or browser-extension level. At the same time, immediately reject unwanted attempts to establish WebSocket connections with unknown local ports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specialized tools.&lt;/strong&gt; Another option is to use software that addresses these issues at the browser-kernel level, such as anti-detect browsers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, Octo Browser includes built-in protection against local port scanning. Octo intercepts any attempts by scripts, including those using the WebSocket API, to access addresses within the &lt;strong&gt;127.0.0.0/8&lt;/strong&gt; range or &lt;strong&gt;localhost&lt;/strong&gt;, handling them directly at the browser API level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing protection measures
&lt;/h2&gt;

&lt;p&gt;You can easily see how this works with a simple test.&lt;/p&gt;

&lt;p&gt;First, start any local server on your device so that it opens a listening port.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqv3vykuqunz85zlasnn0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqv3vykuqunz85zlasnn0.png" alt="Windows command prompt running a local test server with python -m http.server 8080 --bind 127.0.0.1" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;An open port will look something like this.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next, open any website in your browser and attempt to access the open port.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs1ex89xtyjb2nnwsyi2p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs1ex89xtyjb2nnwsyi2p.png" alt="Chrome DevTools console after the WebSocket test: response time 32.30 ms and the message &amp;quot;PORT OPEN&amp;quot;" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In a standard Chrome browser, the response arrives with a slight delay. That delay confirms that the port is open.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faym28v8dw2waijuhw7rn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faym28v8dw2waijuhw7rn.png" alt="DevTools console in Octo Browser after the same test: response time 2.40 ms and the message &amp;quot;PORT CLOSED&amp;quot;" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Perform the same test in Octo Browser, and you'll see that the port appears to be closed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Octo Browser controls access to your local ports to prevent data leaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does Private Network Access (PNA) solve the problem?
&lt;/h2&gt;

&lt;p&gt;Private Network Access (PNA) is a security feature available in modern browsers, particularly Chrome, designed to prevent public websites from sending requests directly to devices or servers on a user's local network.&lt;/p&gt;

&lt;p&gt;Modern browsers try to reduce this type of exposure through several mechanisms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;restricting or completely blocking access to &lt;strong&gt;localhost&lt;/strong&gt; from insecure public contexts;&lt;/li&gt;
&lt;li&gt;requiring a Secure Context (HTTPS) before certain connections can be established;&lt;/li&gt;
&lt;li&gt;performing &lt;strong&gt;CORS&lt;/strong&gt; preflight requests before permitting access to local network resources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, developers of anti-fraud systems have adapted to these protections as well. They can use public domains that resolve to &lt;strong&gt;127.0.0.1&lt;/strong&gt;—for example, &lt;code&gt;yourapp.localhost.com&lt;/code&gt;—along with valid HTTPS certificates to get around some of these basic restrictions.&lt;/p&gt;

&lt;p&gt;More importantly, &lt;strong&gt;PNA does not protect against TCP-level timing attacks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Even when PNA eventually blocks a request because the required headers aren't present, the browser still has to establish a TCP connection before it can determine whether those headers are acceptable.&lt;/p&gt;

&lt;p&gt;If the port is closed, the operating system immediately rejects the connection with a TCP RST packet. If the port is open, the TCP handshake completes successfully. The browser then proceeds with the data exchange, encounters the PNA restrictions, terminates the connection, and only afterward reports the error.&lt;/p&gt;

&lt;p&gt;Those additional steps can introduce delays measured in &lt;strong&gt;tens of milliseconds&lt;/strong&gt; (exactly the kind of timing difference that anti-fraud algorithms can use).&lt;/p&gt;

&lt;p&gt;In other words, PNA prevents websites from accessing local data, but it doesn't hide the time required to establish a connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Effective anonymity today requires a comprehensive approach.&lt;/p&gt;

&lt;p&gt;You can build what appears to be a perfect browser profile, but one overlooked debugging port such as &lt;code&gt;9222&lt;/code&gt; or an exposed database port can undermine otherwise thorough fingerprint spoofing.&lt;/p&gt;

&lt;p&gt;The network stack therefore deserves the same attention as the browser fingerprint itself. Isolate your working environments, configure the firewall carefully, or use solutions that address these types of leaks directly at the browser-kernel level.&lt;/p&gt;

&lt;p&gt;Promo code DEVTO gives new users 4 days of the Starter plan.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>node</category>
      <category>api</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Desktop Fingerprints Are a Minefield. iOS Is Simpler — Here’s Why</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Wed, 17 Jun 2026 10:39:08 +0000</pubDate>
      <link>https://dev.to/octobrowser/desktop-fingerprints-are-a-minefield-ios-is-simpler-heres-why-2pke</link>
      <guid>https://dev.to/octobrowser/desktop-fingerprints-are-a-minefield-ios-is-simpler-heres-why-2pke</guid>
      <description>&lt;p&gt;First of all, it’s worth answering a reasonable question: why should anyone care about anti-detect browsers at all?&lt;/p&gt;

&lt;p&gt;For most developers, “anti-detect” sounds like a shady corner of the web. But the underlying technical problem is real and surprisingly relevant: modern platforms use &lt;strong&gt;device fingerprinting&lt;/strong&gt; and &lt;strong&gt;cross-session correlation&lt;/strong&gt; to decide whether a login, signup, or payment flow is “normal.” And they do it with far more than an IP address.&lt;/p&gt;

&lt;p&gt;In practice, the #1 reason people reach for an anti-detect setup is simple: &lt;strong&gt;they need many clean, independent signups without getting rate-limited, flagged, or forced into endless verification loops.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Platforms don’t just limit by IP — they also correlate devices via fingerprint signals, cookies/local storage, and behavioral patterns. When those signals look “reused,” even legitimate flows can get blocked.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8s050m1yyj2bp4zreml.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp8s050m1yyj2bp4zreml.jpg" alt="digital fingerprints" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most mainstream anti-detect browsers focus on the same core set of needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;isolated profiles (separate cookies/storage)&lt;/li&gt;
&lt;li&gt;fingerprint control/spoofing&lt;/li&gt;
&lt;li&gt;proxy support (HTTP/SOCKS5)&lt;/li&gt;
&lt;li&gt;team workflows (sharing profiles, roles, sync).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The market is mature on desktop — but &lt;strong&gt;mobile-first iOS fingerprinting was a gap&lt;/strong&gt;, which is why an iOS anti-detect browser stands out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why iOS anti-detect is a strong anti-fraud strategy
&lt;/h2&gt;

&lt;p&gt;Anti-fraud systems try to answer one question: &lt;em&gt;is this the same actor returning with a “new” account&lt;/em&gt;? On a desktop, that decision is often made by correlating dozens (sometimes hundreds) of signals at once — so to look consistently “new,” you have to spoof a huge surface area.&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;desktop&lt;/strong&gt;, a modern fingerprint typically includes many high-entropy parameters, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;browser engine and version details, UA/UA-CH consistency&lt;/li&gt;
&lt;li&gt;screen and window metrics, device memory, CPU cores&lt;/li&gt;
&lt;li&gt;canvas/WebGL/audio fingerprints, installed fonts, GPU and drivers&lt;/li&gt;
&lt;li&gt;WebRTC, media devices, permissions state&lt;/li&gt;
&lt;li&gt;timezone/locale/languages, system platform hints&lt;/li&gt;
&lt;li&gt;extensions/plugins, automation artifacts, storage quirks&lt;/li&gt;
&lt;li&gt;behavioral signals (typing/mouse patterns) and stability across sessions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because the parameter space is large, it’s easy to create &lt;strong&gt;mismatches&lt;/strong&gt; (e.g., GPU says one thing, WebGL says another; fonts don’t match the OS; timezone doesn’t match IP). Those inconsistencies are exactly what anti-fraud models learn to detect.&lt;/p&gt;

&lt;p&gt;On &lt;strong&gt;iOS&lt;/strong&gt;, the environment is much more standardized:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apple tightly controls hardware + OS + browser engine (WebKit)&lt;/li&gt;
&lt;li&gt;Safari has fewer exposed/variable fingerprint surfaces than desktop browsers&lt;/li&gt;
&lt;li&gt;the device ecosystem is less diverse, so many real users look very similar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That means two things for anti-detect use cases:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fewer parameters to spoof&lt;/strong&gt;: a mobile Safari profile can appear believable with fewer moving parts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More “trustworthy” fingerprints&lt;/strong&gt;: iOS traffic often looks more like baseline consumer behavior, and many anti-fraud systems treat it as lower risk than desktop automation-like patterns — especially when the fingerprint, IP geolocation, and account behavior are consistent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In short, if you need many clean, independent sessions, iOS profiles reduce the complexity of fingerprint management while still producing signals that blend into a huge population of real Safari users.&lt;/p&gt;

&lt;p&gt;A side note: desktop anti-detect browsers still matter a lot. A lot of platforms and professional tools are built around desktop experiences (ad managers, seller/partner portals, analytics dashboards), and teams frequently rely on desktop-only capabilities like extensions, richer devtools, cookie editors, and automation frameworks. Desktop setups also provide &lt;strong&gt;deeper control and reproducibility&lt;/strong&gt;—browser/OS versions, hardware- and render-level signals, and long-lived profile management—which matters when you need to match a specific persona, debug edge cases, or maintain accounts that were created and historically used on desktop. In practice, iOS can be an excellent “clean signup / low-friction” channel, while desktop anti-detect remains the workhorse for compatibility and fine-grained control.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Octo Browser for iOS?
&lt;/h2&gt;

&lt;p&gt;Logically, iOS anti-detect browsers should have been created long ago: registrations from mobile devices often run into fewer platform-side blocks because some anti-fraud systems are more lenient toward mobile traffic — especially when signals are consistent.&lt;/p&gt;

&lt;p&gt;Octo Browser for iOS is a mobile application for iPhone and iPad that lets you create iOS profiles. The profiles use mobile Safari fingerprints, and you can connect proxies to them. Overall, everything works similarly to the desktop anti-detect browsers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F604730nhem4xae23xfy9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F604730nhem4xae23xfy9.png" alt="ios antidetect" width="512" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installation&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;To start using the browser, you need to download the app. You can do it &lt;a href="https://apps.apple.com/us/app/octo-browser/id6762627194" rel="noopener noreferrer"&gt;here&lt;/a&gt; or by searching the App Store.&lt;/li&gt;
&lt;li&gt;Next, you need to complete the registration process. This can be done directly in the app, on the &lt;a href="https://octobrowser.org/" rel="noopener noreferrer"&gt;Octo Browser website&lt;/a&gt;, or through Apple ID.&lt;/li&gt;
&lt;li&gt;If you already have an Octo Browser account, you can simply log into it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Main features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The app lets you create browser profiles with Apple mobile device fingerprints. Octo Browser for iOS uses native Apple technologies, so the fingerprints are designed to closely match those of regular Safari users, while also preventing profile data overlaps and session leaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.Create profiles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On iOS, a “profile” should be a fully isolated container:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Storage: separate cookies + local/session data&lt;/li&gt;
&lt;li&gt;Fingerprint: Safari/iOS version, screen, locale/time zone, languages&lt;/li&gt;
&lt;li&gt;Network: proxy bound per profile (avoid mismatched signals)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Octo Browser supports HTTP and SOCKS5 proxies with UDP traffic routing. If you already have proxies in your Octo account, you can use them. Free proxies are also available during launch (proxy quality and geo consistency still matter for anti-fraud systems).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83xrhtjvyhgeim47kzh1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F83xrhtjvyhgeim47kzh1.png" alt="proxy setup ios anti-detect browser" width="512" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.Profile management and teamwork&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Octo Browser for iOS includes cloud sync and has no limit on connected devices. This makes teamwork easy and comfortable. For convenient profile management, Octo includes most of the familiar features from the desktop browser version: cookie import and export, tags, trash, and browsing history.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.Camera feed spoofing&lt;/strong&gt;&lt;br&gt;
High-quality camera/video feed spoofing is not something you see often in anti-detect browsers. In the case of Octo Browser for iOS, this functionality arguably works even better than on desktop. The browser lets you replace the camera feed with another video or image as many times as you want without reloading the page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;Demand for an iOS anti-detect browser already exists, and there is a reason for that: currently, when registering on well-protected websites, users of such devices can have an advantage, as they may raise suspicion less often because Safari/iOS fingerprints are relatively standardized compared to desktop environments.&lt;/p&gt;

&lt;p&gt;Using mobile iOS fingerprints can improve the success rate of account registrations. This is where &lt;a href="https://apps.apple.com/us/app/octo-browser/id6762627194" rel="noopener noreferrer"&gt;Octo Browser for iOS&lt;/a&gt; helps: it generates trustworthy profile fingerprints that anti-fraud systems will see as identical to those of millions of real iOS users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;As part of the open testing, Octo Browser for iOS is completely free at launch. You can download it right now and get 100 profiles and free proxies.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How reCAPTCHA v3, Turnstile and hCaptcha Work: Scoring and Token Checks</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Thu, 21 May 2026 11:07:07 +0000</pubDate>
      <link>https://dev.to/octobrowser/how-next-generation-captchas-work-and-why-it-matters-for-automation-2oe1</link>
      <guid>https://dev.to/octobrowser/how-next-generation-captchas-work-and-why-it-matters-for-automation-2oe1</guid>
      <description>&lt;p&gt;Modern captchas aren't the simple puzzle-clicking tests anymore. They're full-blown behavioral and environmental verification systems. They look at everything — your &lt;a href="https://dev.to/octobrowser/how-browser-fingerprinting-works-3f87"&gt;browser fingerprint&lt;/a&gt;, device parameters, how you move your mouse, how you interact with the page. That little box you tick or the traffic lights you click? Just the final layer of a much deeper process.&lt;/p&gt;

&lt;p&gt;If you're building scrapers, automation scripts, or working with anti-detect browsers, you need to understand how these things actually work under the hood. In practice, captcha handling comes down to two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scoring — who calculates your risk score and what model they use.&lt;/li&gt;
&lt;li&gt;Signals — what data gets collected from your browser and how it's sent to the verification server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Different captcha providers do this differently. In this article, we break down three of the most common and technically advanced ones: reCAPTCHA v3, Cloudflare Turnstile, and hCaptcha. We'll look at how each one is built, what signals they grab, and how they decide whether you're a human or a bot.&lt;/p&gt;

&lt;h2&gt;
  
  
  How captchas work
&lt;/h2&gt;

&lt;h3&gt;
  
  
  reCAPTCHA v3 (Google)
&lt;/h3&gt;

&lt;p&gt;A classic example of an invisible scoring model. The browser silently collects behavioral data — how you move your mouse, scroll, interact with elements — and exchanges it with Google for a token.&lt;/p&gt;

&lt;p&gt;That token is then sent to the website's backend. The server makes a separate request to Google's verification endpoint, passing the token along with a secret key. Google responds with a JSON payload containing a risk score between 0.0 (bot) and 1.0 (human), plus an action label that matches the one you sent.&lt;/p&gt;

&lt;p&gt;If the score comes back low (typically below 0.5), it's up to the website owner to decide what happens next. Some sites block the request entirely. Others fall back to a visible reCAPTCHA v2 challenge — those familiar grids of traffic lights, bridges, or storefronts.&lt;/p&gt;

&lt;p&gt;Integration example. On a page that includes a captcha, you load the script like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://www.google.com/recaptcha/api.js?render=Your_site_key"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the target action occurs (for example, when clicking the “Login” button), the following method is called:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="n"&gt;grecaptcha&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'YOUR_SITE_KEY'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'login'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// This token is sent to the website backend along with the form data&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwvycaptgi3wz3s24vax.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpwvycaptgi3wz3s24vax.jpg" alt="reCAPTCHA v3 demo page with the DevTools Network tab showing the verify response: success true, score 0.7, action demo_action" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The token is valid for only 2 minutes and can be used for verification only once.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Important nuance for scrapers: the score isn't just about behavior — Google also considers the website's enterprise tier. When they increased the weight of TLS ClientHello fingerprints, the score drops below 0.1 even with a valid token if your request doesn't mimic Chrome 122+ (JA3 hash).&lt;/p&gt;

&lt;p&gt;Backend verification example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="c1"&gt;# client_ip must be obtained from request.remote_addr or headers&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'https://www.google.com/recaptcha/api/siteverify'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s1"&gt;'secret'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'YOUR_SECRET_KEY'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'response'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s1"&gt;'remoteip'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;client_ip&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'score'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Fallback to v2 or blocking&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Cloudflare Turnstile
&lt;/h3&gt;

&lt;p&gt;A verification platform with no visual puzzles. Instead of showing you a CAPTCHA, it runs a dynamic set of background checks inside your browser. Most users never notice anything — no clicking, no image selection, no explicit actions at all.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwcm0ixk18xen25wca95.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwcm0ixk18xen25wca95.jpg" alt="Cloudflare Turnstile widget: &amp;quot;Verify you are human&amp;quot; checkbox and the &amp;quot;Success!&amp;quot; state" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Main check types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Proof-of-work.&lt;/strong&gt; The browser gets a hashing task to solve. Short CPU spike. Doesn't hurt real users but makes mass automated requests more expensive to run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Environment integrity.&lt;/strong&gt; Turnstile compares declared params (User-Agent, platform, etc.) against what the browser engine can actually do. Mismatch = higher risk score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API availability.&lt;/strong&gt; Checks for modern web standards — Canvas, WebAudio, WebRTC, etc. Bots running on stripped-down or outdated engines often fail here because they don't fully implement these APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implementation validation.&lt;/strong&gt; Not just whether an API exists, but whether it behaves like a real browser. For example: does Canvas rendering match Chrome's reference profile, or does it have artifacts from virtualized or spoofed drivers?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Battery API and Permissions Policy.&lt;/strong&gt; Turnstile also checks both. Node.js bots in headless mode often screw up &lt;code&gt;navigator.getBattery()&lt;/code&gt;. Common patch via puppeteer-extra:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluateOnNewDocument&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;originalQuery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;originalQuery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parameters&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'granted'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After these checks, ML models are applied to evaluate the results and a short-lived one-time token is issued.&lt;/p&gt;

&lt;p&gt;The script connection works similarly to reCAPTCHA. &lt;strong&gt;Example integration:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://challenges.cloudflare.com/turnstile/v0/api.js"&lt;/span&gt; &lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Widget element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"cf-turnstile"&lt;/span&gt; &lt;span class="na"&gt;data-sitekey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"yourSiteKey"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turnstile modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Managed&lt;/strong&gt; — a widget appears on the page, but in most cases it auto-verifies and turns green instantly. No user interaction required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invisible&lt;/strong&gt; — runs entirely in the background. No widget, no UI, no user involvement at all.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If Turnstile detects elevated risk or weird signals, it escalates. The user might see a checkbox to tick. In rare cases, it can fall back to a full visual challenge, but that's not the default behavior.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvphmmjshxh5h7b2pst0i.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvphmmjshxh5h7b2pst0i.jpg" alt="Cloudflare dashboard Turnstile settings with widget modes Managed, Non-interactive and Invisible, plus site key and secret key fields" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once verification is complete, the widget drops the token into a hidden form field named &lt;code&gt;cf-turnstile-response&lt;/code&gt;. The website's backend then takes that token and sends a POST request to Cloudflare at &lt;a href="https://challenges.cloudflare.com/turnstile/v0/siteverify" rel="noopener noreferrer"&gt;https://challenges.cloudflare.com/turnstile/v0/siteverify&lt;/a&gt;, passing two parameters: &lt;code&gt;secret&lt;/code&gt; and &lt;code&gt;response=token&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Like reCAPTCHA, the token is single-use. However, it has a longer lifespan — 5 minutes. If the response contains &lt;code&gt;"success": false&lt;/code&gt;, the &lt;code&gt;error-codes&lt;/code&gt; field will explain why. For instance, &lt;code&gt;invalid-input-response&lt;/code&gt; means the token expired or was tampered with.&lt;/p&gt;

&lt;h3&gt;
  
  
  hCaptcha
&lt;/h3&gt;

&lt;p&gt;A hybrid verification model that serves as a privacy-focused alternative to Google's solutions. In its basic setup, it presents the familiar "I am human" checkbox. When the system picks up suspicious signals, it escalates — showing more complex visual challenges that are typically harder than Google's.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5ihnhlbw517l1h3b847.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5ihnhlbw517l1h3b847.jpg" alt="hCaptcha visual challenge with the prompt &amp;quot;Click the object that moves differently&amp;quot; and several 3D shapes" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Beyond the standard setup, hCaptcha also offers Invisible and Passive modes, where verification happens with little to no user interaction. Enterprise clients get access to a scoring mechanism similar to Google's — risk assessment without any interactive challenges.&lt;/p&gt;

&lt;p&gt;Example integration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://js.hcaptcha.com/1/api.js"&lt;/span&gt; &lt;span class="na"&gt;async&lt;/span&gt; &lt;span class="na"&gt;defer&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"h-captcha"&lt;/span&gt; &lt;span class="na"&gt;data-sitekey&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"YOUR_SITE_KEY"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After passing the captcha, a hidden field &lt;code&gt;h-captcha-response&lt;/code&gt; appears in the form. The website server verifies it with a POST request: &lt;a href="https://api.hcaptcha.com/siteverify" rel="noopener noreferrer"&gt;https://api.hcaptcha.com/siteverify&lt;/a&gt;. Parameters: &lt;code&gt;secret&lt;/code&gt;, &lt;code&gt;response&lt;/code&gt;, and preferably &lt;code&gt;remoteip&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rk1f632goc5p1rhe3fh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0rk1f632goc5p1rhe3fh.jpg" alt="hCaptcha dashboard page &amp;quot;Install hCaptcha on your website or app&amp;quot; with the steps to create a site and generate a secret" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Server response: in the free version everything is straightforward:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// or false&lt;/span&gt;
  &lt;span class="nl"&gt;"challenge_ts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the Enterprise version, the JSON contains additional fields with a risk score and rejection reasons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison table by criteria
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criterion&lt;/th&gt;
&lt;th&gt;reCAPTCHA v3 (Google)&lt;/th&gt;
&lt;th&gt;Cloudflare Turnstile&lt;/th&gt;
&lt;th&gt;hCaptcha&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Detection logic&lt;/strong&gt; (where you can lose score)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Behavioral history.&lt;/strong&gt; The system takes into account the user’s digital footprint within the Google ecosystem. Lack of search history, Google cookies, authorized sessions, or having an IP address in reputation lists directly lowers the final risk score.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Environment and fingerprint.&lt;/strong&gt; Strictly checks browser consistency (TLS fingerprint, Canvas, WebGL). Mismatch between Headless parameters and real Chrome results in failure.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;IP and behavior.&lt;/strong&gt; Reacts aggressively to datacenter IPs and unnatural mouse movements. Often issues complex visual tasks.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bypass difficulty&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High.&lt;/strong&gt; Getting a token is easy, but getting a high score is difficult. You will need properly prepared profiles and residential proxies.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High.&lt;/strong&gt; Can be bypassed with a high-quality anti-detect browser or proper JS environment patching.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Medium/High.&lt;/strong&gt; The main protection measure is visual. Can be bypassed using dedicated visual recognition services (although many have become inadequate).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Resource load&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Low.&lt;/strong&gt; The script itself is lightweight but requires resources to maintain profiles (cookies, history).&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High.&lt;/strong&gt; Uses proof-of-work and loads the CPU with mathematical tasks.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High (time/money).&lt;/strong&gt; Requires either payment for solving or time spent clicking.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dependence on JS/Cookies&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Critical.&lt;/strong&gt; Does not work without JS. For score &amp;gt;0.3 cookies (SID/HSID) are almost mandatory.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High.&lt;/strong&gt; Does not work without JS. Cookies are less important than fingerprint integrity and a clean IP.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Medium.&lt;/strong&gt; Requires JS. Cookies are secondary; a clean IP is important. Often used as a click-through placeholder.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Captcha bypass strategies
&lt;/h2&gt;

&lt;p&gt;When you're dealing with large-scale scraping, multi-accounting, or heavy web automation, you've got three main options for handling captchas. Which one you pick depends on your traffic volume, how stable you need things to be, and how aggressive the target site's protection is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delegating: using an intermediary service
&lt;/h3&gt;

&lt;p&gt;The most popular approach for scalable systems. You don't solve the captcha yourself — you send it to a third-party service that solves it and hands you back a token.&lt;/p&gt;

&lt;p&gt;But getting the token is only half the battle. The website won't know the captcha has been solved until you actually apply it. This usually means injecting it via JavaScript.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Locate the hidden field — typically named &lt;code&gt;g-recaptcha-response&lt;/code&gt; — and insert the token there.&lt;/li&gt;
&lt;li&gt;The critical part: you also need to trigger the callback function that kicks off server-side verification. Skip this, and the "Submit" button might stay disabled.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo47iu3plnjivqv5n41n3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo47iu3plnjivqv5n41n3.jpg" alt="reCAPTCHA v3 demo page with the DevTools Elements tab showing the hidden g-recaptcha-response textarea" width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Insert token into hidden field&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_script&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"document.getElementsByName('g-recaptcha-response')[0].value = arguments[0];"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Call the callback function (a trigger for the website)&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_script&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"submitCallback('{token}');"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Possible pitfalls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;User-Agent matching.&lt;/strong&gt; The User-Agent string used by the solving service must match the one you use when submitting the token. If the service solved the captcha with Chrome 139 but you submit the token with Chrome 140 headers, the token gets rejected. This is especially critical for Turnstile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proxy matching.&lt;/strong&gt; For reCAPTCHA v3 and hCaptcha Enterprise, you really want to send your proxy to the recognition service. The captcha should be solved from the same IP address you'll use to access the site. Otherwise, Google detects the mismatch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic parameters.&lt;/strong&gt; Sometimes the SiteKey alone isn't enough. Take Google SERP or other heavily protected systems — they often require a &lt;code&gt;data-s&lt;/code&gt; parameter that's dynamically generated on each page load. If you just send the SiteKey to the solving service without this parameter, you'll get a valid token, but the website won't accept it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Browser emulation (Puppeteer/Selenium + Stealth)
&lt;/h3&gt;

&lt;p&gt;This approach is necessary when the target site strictly checks the JS environment — Turnstile and hCaptcha Enterprise fall into this category. Standard Puppeteer or Selenium gets detected immediately because &lt;code&gt;navigator.webdriver&lt;/code&gt; is set to true.&lt;/p&gt;

&lt;p&gt;So you need additional tools: puppeteer-extra-plugin-stealth, Undetected Chromedriver, or Octo Browser via API.&lt;/p&gt;

&lt;p&gt;The core idea is that the browser runs on a modified Chromium kernel that spoofs critical fingerprints — Canvas, WebGL, WebRTC, Audio — at the native C++ code level, not through JS injections.&lt;/p&gt;

&lt;p&gt;This is the key difference. Turnstile looks for traces of JS-level interference. Octo has none. The browser introduces unique hardware noise and parameters, passes integrity checks, and you get the token automatically.&lt;/p&gt;

&lt;p&gt;The downside: this method eats RAM and CPU. Not suitable for thousands of threads. But for 50–100 threads, it's optimal.&lt;/p&gt;

&lt;p&gt;If you need 100+ threads, combine it with Docker and flags like &lt;code&gt;--no-sandbox --disable-gpu&lt;/code&gt;. With Playwright, a stealth plugin, and residential proxies, expect around a 70% success rate bypassing Turnstile. Alternatively, use the Octo Browser API in headless mode.&lt;/p&gt;

&lt;h3&gt;
  
  
  HTTP-level requests (TLS fingerprinting)
&lt;/h3&gt;

&lt;p&gt;This is an advanced approach for high-volume scraping, using languages like Go, Python (Requests), or C#. No browser involved. Instead, you reproduce the network fingerprint of a real browser.&lt;/p&gt;

&lt;p&gt;The catch: standard HTTP libraries like Python Requests do TLS handshakes differently than browsers. Different order of parameters, different connection signature. Cloudflare spots these discrepancies and can block your request before the captcha script even loads.&lt;/p&gt;

&lt;p&gt;But there are libraries that can mimic the TLS fingerprint of an actual browser. With those, you can pass Cloudflare Turnstile checks without spinning up a browser at all.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why your bot receives a low score or a ban
&lt;/h3&gt;

&lt;p&gt;If you sent the captcha to a solving service, injected the token, and still can't get in — the issue is probably not the captcha itself. Check these instead:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dirty proxies.&lt;/strong&gt; Datacenter IPs are flagged as high risk by Google and Cloudflare right out of the gate. The fix? Use mobile or residential proxies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of profile preparation (reCAPTCHA v3 specific).&lt;/strong&gt; You're hitting the site with a clean, empty profile — no history, no cookies. To reCAPTCHA v3, that screams "bot". You need properly prepared profiles with saved SID/HSID cookies from an authenticated Google session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Header inconsistency.&lt;/strong&gt; The order of your request headers doesn't match what a real browser sends. Chrome, for example, has a specific order: &lt;code&gt;Host -&amp;gt; Connection -&amp;gt; sec-ch-ua...&lt;/code&gt; If your library sends headers in a different sequence, anti-fraud systems will notice.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By 2026, automation isn't just about writing scripts — it's about building a solid architecture and staying in control at every level of interaction.&lt;/p&gt;

&lt;p&gt;reCAPTCHA v3 isn't really beaten by solving challenges. It's all about reputation management: high-quality profiles, consistent interaction history, and a stable environment.&lt;/p&gt;

&lt;p&gt;Cloudflare Turnstile is strict about environment integrity. Any mismatch in JS behavior, API responses, or TLS fingerprints will lower your trust score and trigger escalation.&lt;/p&gt;

&lt;p&gt;hCaptcha leans more on visual tasks, which actually makes it easier to bypass with modern computer vision models compared to the other two.&lt;/p&gt;

&lt;p&gt;Bottom line: beating captchas today means understanding how anti-bot systems think and managing your digital fingerprint at every single step. Promo code &lt;strong&gt;DEVTO&lt;/strong&gt; gives new Octo Browser users 4 days of the Starter plan.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>selenium</category>
      <category>api</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How Anonymity Checkers Work — Pixelscan, BrowserLeaks, Whoer, and CreepJS</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Thu, 23 Apr 2026 13:27:26 +0000</pubDate>
      <link>https://dev.to/octobrowser/how-anonymity-checkers-work-pixelscan-browserleaks-whoer-and-creepjs-5b37</link>
      <guid>https://dev.to/octobrowser/how-anonymity-checkers-work-pixelscan-browserleaks-whoer-and-creepjs-5b37</guid>
      <description>&lt;p&gt;Over the past few years, the approach to digital privacy has changed significantly. Platforms have started tracking users more aggressively and implementing identification technologies. One of the most important is browser fingerprinting — a method that identifies users based on the unique characteristics of their device and browser.&lt;/p&gt;

&lt;p&gt;Unlike cookies, fingerprinting works passively. The system quietly queries dozens of browser API parameters — from installed fonts to the GPU — and builds a unique digital signature. It survives both cache clearing and IP changes.&lt;/p&gt;

&lt;p&gt;As this technology evolved, specialized services known as checkers began to appear. They let you quickly assess how unique your browser looks and what data it exposes. However, many people mistakenly treat checker results as the ultimate measure of anonymity. Let's examine the architecture of leading checkers, what they actually test, and whether you can trust their results.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Basics: &lt;a href="https://whoer.net/" rel="noopener noreferrer"&gt;Whoer.net&lt;/a&gt; and Network Anonymity
&lt;/h2&gt;

&lt;p&gt;Whoer is one of the simplest checkers. You visit the site, and it shows everything about your connection and browser — from IP address to system time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F652ycueut9c7sr54hnmk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F652ycueut9c7sr54hnmk.jpg" alt="how anonymity checkers work: Whoer" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's typically used to verify that a VPN, proxy, or anti-detect browser is configured correctly and isn't leaking real data. Whoer doesn't dig into GPU rendering or other hardware-level parameters. It focuses on visible identity — the network parameters your connection openly exposes to servers.&lt;/p&gt;

&lt;p&gt;What it checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Geo consistency. If your profile is mimicking a California resident, Whoer checks whether the IP belongs to a US address pool and whether the system time zone matches the declared state.&lt;/li&gt;
&lt;li&gt;DNS leaks. Whether your requests are going through your real home ISP instead of your configured VPN or proxy.&lt;/li&gt;
&lt;li&gt;WebRTC. Attempts to extract your real local and public IP through P2P browser connections.&lt;/li&gt;
&lt;li&gt;Basic fingerprint. OS version, browser version, JavaScript status, installed plugins, screen parameters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whoer gamified the process and introduced an "anonymity percentage" on a 100-point scale. At 90–100%, you look like a regular user from your declared country. At 40–70%, it highlights issues and gives tips on how to fix them.&lt;/p&gt;

&lt;p&gt;Whoer doesn't go deeper. But if you need to quickly check your proxies for network leaks, it does the job perfectly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep Audit: BrowserLeaks and Hardware Entropy
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://browserleaks.com/" rel="noopener noreferrer"&gt;BrowserLeaks&lt;/a&gt; goes much deeper and focuses on technical analysis. The service collects and displays a wide range of parameters related to your browser, device, and runtime environment.&lt;/p&gt;

&lt;p&gt;It doesn't give scores — it just shows factual data that almost any website can collect about your browser. Interpreting these values requires technical understanding.&lt;/p&gt;

&lt;p&gt;BrowserLeaks checks graphics rendering parameters (Canvas, WebGL), analyzes audio processing, detects available system fonts, and collects various network and system characteristics used for fingerprinting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5x55m1qn60py321btsu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5x55m1qn60py321btsu.jpg" alt="how does browserleaks works" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Canvas Fingerprinting
&lt;/h3&gt;

&lt;p&gt;The most well-known method of hardware tracking. The browser receives a hidden command to render a complex image on an invisible &lt;code&gt;canvas&lt;/code&gt; element (usually text with specific fonts, shadows, and semi-transparent colors). Based on the rendering result, the checker infers your OS and browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8fh8lxpbyp6lzbevmhe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm8fh8lxpbyp6lzbevmhe.jpg" alt="canvas fingerprinting" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unlike cookies (easy to delete) or IP addresses (easy to change), the Canvas fingerprint relies on your device's physical parameters. It survives cache clearing, time zone changes, and incognito mode.&lt;/p&gt;

&lt;p&gt;If you create multiple accounts on a service from the same computer, just changing proxies, Canvas will link them all in one chain. Same hardware means the same image hash every time.&lt;/p&gt;

&lt;p&gt;Different operating systems use their own font smoothing algorithms (ClearType on Windows, Quartz on macOS, FreeType on Linux). Different GPU drivers round pixels and handle floating-point calculations differently. Together, this forms a unique Canvas.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Cross-Platform Myth
&lt;/h3&gt;

&lt;p&gt;You create a profile in an anti-detect browser and choose macOS in settings, even though your device runs Windows. The anti-detect browser changes the &lt;code&gt;User-Agent&lt;/code&gt;, injects the correct headers, and adjusts screen resolution. But when the site requests Canvas rendering — the checker shows your Windows. Why?&lt;/p&gt;

&lt;p&gt;The vast majority of anti-detect browsers are built on Chromium. Graphics rendering is handled by the Skia engine. But for fonts and shadows, Skia calls your operating system's low-level APIs. On Windows, it calls DirectWrite and ClearType. On macOS, it calls CoreText and Quartz (Apple's proprietary engine).&lt;/p&gt;

&lt;p&gt;For your Windows-based anti-detect browser to render Canvas like a Mac, developers would have to remove DirectWrite calls and somehow embed Apple's closed code. This is technically impossible.&lt;/p&gt;

&lt;p&gt;If you've read anti-detect browser documentation, you may have noticed they often recommend using the same OS as your real one. They rarely explain why.&lt;/p&gt;

&lt;p&gt;Technically, there's a workaround: disable GPU &lt;code&gt;hardware acceleration&lt;/code&gt;. Then the CPU renders images via Google &lt;code&gt;SwiftShader&lt;/code&gt;. You'll get a different Canvas hash, but in the WebGL section, you'll see "SwiftShader" instead of a GPU. Regular users don't disable hardware acceleration, so this would attract anti-fraud attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Consistency Police: Pixelscan
&lt;/h2&gt;

&lt;p&gt;BrowserLeaks shows what you have. &lt;a href="https://pixelscan.net/" rel="noopener noreferrer"&gt;Pixelscan&lt;/a&gt; checks whether you're lying. Modern anti-fraud doesn't ban for fingerprint uniqueness (millions of legitimate users are unique) — it bans for logical contradictions. If your User-Agent says Windows but &lt;code&gt;navigator.platform&lt;/code&gt; returns Linux, Pixelscan throws an error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbsnmuist85sx05nohce.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxbsnmuist85sx05nohce.jpg" alt="Pixelscan website" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Octo Browser, you can set any values for &lt;code&gt;hardwareConcurrency&lt;/code&gt; (CPU cores) and &lt;code&gt;deviceMemory&lt;/code&gt; (RAM). But in reality, these correlate with each other. &lt;strong&gt;Try Octo Browser for free with promo code DEVTO.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another example: your profile settings specify 1920×1080 resolution, but Pixelscan sees that the browser viewport is also exactly 1920×1080. Regular users always lose some screen space to taskbars, browser frames, and tabs.&lt;/p&gt;

&lt;p&gt;A clean local Chrome without extensions sometimes shows an "Inconsistent" status. Reasons include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Network changes (switched from Wi-Fi to LTE, system changed time zone)&lt;/li&gt;
&lt;li&gt;Privacy browsers (Brave or uBlock restrict APIs, breaking fingerprint consistency)&lt;/li&gt;
&lt;li&gt;Relocation (moved to another region, but device time zone didn't update)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pixelscan compares your Canvas hash against a massive database of real devices. If your hash is 100% unique — that's bad. A good profile should blend into the crowd.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pixelscan's advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comprehensiveness. Analyzes consistency between parameters, not just individual values. This is exactly how anti-fraud systems at Facebook, Google, and Amazon work.&lt;/li&gt;
&lt;li&gt;Automation detection. Easily spots traces of Puppeteer and Playwright.&lt;/li&gt;
&lt;li&gt;Real fingerprints. The platform compares your data against a database of actual devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pixelscan is an excellent training tool, but the goal of an anti-detect browser isn't green checkmarks — it's avoiding bans on your target service. Sometimes a profile with a few warnings lasts longer than a perfect but suspiciously sterile account.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advanced Detection: CreepJS
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://abrahamjuliot.github.io/creepjs/" rel="noopener noreferrer"&gt;CreepJS&lt;/a&gt; isn't a commercial product — it's an open-source project by security researchers. It doesn't need a fancy UI. It aggressively and deeply inspects your browser's JavaScript engine, looking for interference in the browser kernel and traces of spoofing and automation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pa35hxv7tvrry18i8k3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pa35hxv7tvrry18i8k3.jpg" alt="creepjs anonymity" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Regular checkers just take a hash of the rendered Canvas image. CreepJS can analyze the actual image texture and detect noise-injection algorithms. Adding random color noise to pixels is an outdated workaround that CreepJS highlights.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvn9s61p2pzvu31xkqgey.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvn9s61p2pzvu31xkqgey.jpg" alt="clean porfile on CreepJs" width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;A clean profile&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rajri8op8j1k66oqv7g.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8rajri8op8j1k66oqv7g.jpg" alt="profile with noise CreepJs" width="800" height="500"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Profile with noise&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The checker looks for hidden browser control flags from Puppeteer, Playwright, or Selenium, checks for headless mode, the &lt;code&gt;webdriver&lt;/code&gt; object, and how window parameters naturally behave.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fudkqoabv2goxwntp8pjw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fudkqoabv2goxwntp8pjw.jpg" alt="anonymity checkers explained" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you run a high-quality anti-detect browser like Octo Browser manually, you will pass this test without issues. But if you automate your workflows via Puppeteer, a cheap anti-detect browser will immediately raise a &lt;code&gt;webdriver: true&lt;/code&gt; red flag, while top-tier solutions can even spoof script-based browser control.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50l3x0gkzmjq643r7in8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F50l3x0gkzmjq643r7in8.jpg" alt="creep js explained" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What else CreepJS detects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prototype tampering. If a cheap extension overwrites a native JS function (to hide the real battery, for example), CreepJS triggers an error in that function and reads the stack trace. Native code produces a system error; fake code reveals its script path.&lt;/li&gt;
&lt;li&gt;Engine math. Forces the browser to calculate complex fractions (sines, cosines). Different engine versions round numbers slightly differently — exposing spoofing.&lt;/li&gt;
&lt;li&gt;Software rendering. Analyzes how WebGL is rendered, detecting software emulators often used on cheap bot farm servers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CreepJS is an objective tool that's nearly impossible to fool. If it finds prototype tampering or math spoofing — the vulnerability is real.&lt;br&gt;
But does a lot of red text mean an instant ban on Google, Facebook, or crypto exchanges? No.&lt;/p&gt;

&lt;p&gt;Why not to absolutize CreepJS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Commercial anti-fraud works differently. Ad networks need real users who generate revenue. They don't ban solely for privacy extensions that restrict APIs.&lt;/li&gt;
&lt;li&gt;False positives. A perfectly clean home Chrome can look suspicious if you install a strict ad blocker, change your time zone, or disable third-party cookies.&lt;/li&gt;
&lt;li&gt;Bans are based on the whole picture. Algorithms consider IP, account history, behavior, and fingerprint together. If your fingerprint is slightly unusual but you behave like a real user with quality proxies — you'll be fine.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;Can you trust checkers? Yes — as diagnostic tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whoer.net quickly checks whether your connection is leaking your real IP or DNS.&lt;/li&gt;
&lt;li&gt;BrowserLeaks shows all the technical data your browser voluntarily gives to websites.&lt;/li&gt;
&lt;li&gt;Pixelscan finds inconsistencies between your profile's declared characteristics and real hardware.&lt;/li&gt;
&lt;li&gt;CreepJS detects deep programmatic interference in browser behavior and bot usage.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The highest level of automation today isn't becoming invisible by locking down all APIs — it's creating a consistent profile that completely blends in among millions of real internet users.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>cybersecurity</category>
      <category>computerscience</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Canvas, WebGL and Audio Fingerprinting: Runnable JS Examples</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Tue, 17 Mar 2026 12:35:29 +0000</pubDate>
      <link>https://dev.to/octobrowser/canvas-audio-and-webgl-analysis-of-fingerprinting-technologies-23e</link>
      <guid>https://dev.to/octobrowser/canvas-audio-and-webgl-analysis-of-fingerprinting-technologies-23e</guid>
      <description>&lt;p&gt;Today, websites don’t rely on cookies alone to recognize visitors. Even if you clear your history, switch IPs or use private browsing mode, your browser can still be identified through a digital fingerprint. This is a hidden set of technical signals that gets generated automatically on every visit.&lt;/p&gt;

&lt;p&gt;A browser fingerprint is a combination of parameters that describe your device and runtime environment. Individual attributes like browser version, screen resolution or language are shared by many users. But when combined, they form a highly distinctive profile. This profile is calculated in real time as the page loads, so it doesn’t depend on stored data. That’s why clearing cookies or using incognito mode doesn’t really change much.&lt;/p&gt;

&lt;p&gt;Beyond basic indicators such as user agent, timezone or interface language, modern fingerprinting relies on more advanced techniques like Canvas, AudioContext and WebGL. These methods use the browser’s graphics and audio stack to extract deeper information about your hardware and system. What makes them so accurate, and how do they actually distinguish one device from another? This article runs each technique in the browser console. The basic signals (headers, IP address, screen, fonts, timezone) are covered in &lt;a href="https://dev.to/octobrowser/how-browser-fingerprinting-works-3f87"&gt;How Browser Fingerprinting Works&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Canvas fingerprinting
&lt;/h2&gt;

&lt;p&gt;The Canvas API allows browsers to render graphics using JavaScript. In fingerprinting, this feature is used in a less obvious way. A script on a webpage creates an invisible &lt;code&gt;canvas&lt;/code&gt; element and executes a series of drawing commands, such as rendering text, shapes, shadows, and gradients. The resulting image is then read as pixel data and converted into a hash that acts as a unique identifier.&lt;/p&gt;

&lt;p&gt;Here’s how the process works in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Canvas creation.&lt;/strong&gt; The page dynamically creates a &lt;code&gt;canvas&lt;/code&gt; element, usually outside the visible area.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drawing.&lt;/strong&gt; JavaScript draws test graphics. This often includes text with specific fonts, geometric shapes, lines, shadows, and gradients to trigger different rendering behaviors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reading the pixels.&lt;/strong&gt; The script reads the output using methods like &lt;code&gt;toDataURL()&lt;/code&gt;, which converts the canvas content into a string representation of the image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hashing.&lt;/strong&gt; The data is passed through a hashing function, producing a fingerprint that gets sent to the server.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The example below draws the word “Fingerprint” on a Canvas and computes a primitive hash:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"canvas"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"2d"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textBaseline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"top"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;font&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"20px Arial"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fillStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"#f60"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Fingerprint"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toDataURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;charCodeAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;hash&lt;/span&gt; &lt;span class="o"&gt;|=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Canvas hash:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code outputs a 32-bit number (it can be negative due to overflow) that depends on how exactly the browser renders the text. In a different browser, like Opera in this example, the result may change. Sometimes it can match, but that’s relatively rare.&lt;/p&gt;

&lt;p&gt;On a different machine, the chances of getting a different result are even higher, although matches are still possible in edge cases.&lt;/p&gt;

&lt;p&gt;As shown in the screenshots below, even on the same device but across different browsers, the hash is not the same. In one case, the word “Fingerprint” was rendered in Chrome, and in the other, in Opera. You can try running this on your own machine and compare the results.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fylx715r1j9si766add8p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fylx715r1j9si766add8p.png" alt="DevTools console after running the Canvas hash script, output &amp;quot;Canvas hash: 512224445&amp;quot;" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fws7i00t8kf1tkrkgzson.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fws7i00t8kf1tkrkgzson.png" alt="DevTools console after running the same Canvas hash script in another browser, output &amp;quot;Canvas hash: -998672798&amp;quot;" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The differences in a Canvas hash don’t come from the text itself. Visually, the word “Fingerprint” looks the same on almost any device. The uniqueness comes from how it’s rendered under the hood.&lt;/p&gt;

&lt;p&gt;Every OS and browser handles font smoothing, curves, hinting, and rasterization a bit differently. Then you add GPU differences, drivers, and hardware quirks, and you end up with tiny variations in the final image. On one device a pixel might be slightly lighter, on another slightly darker, or edges may be smoothed in a different way. You won’t notice it visually, but the hash will.&lt;/p&gt;

&lt;p&gt;To increase entropy, websites don’t just render simple text. They often use strings that cover most of the alphabet, like “Cwm fjordbank glyphs vext quiz”. On top of that, they may add shadows, gradients, or colored shapes to extract more pixel-level differences.&lt;/p&gt;

&lt;p&gt;The result is a stable hash string (something like &lt;code&gt;e3d52382d0…&lt;/code&gt;) that stays consistent across visits, as long as the browser environment doesn’t change. In theory, two machines with identical fonts, GPUs, and drivers could produce the same fingerprint, but in reality that almost never happens. The combination of rendering factors is almost always unique, which makes Canvas a very effective tracking method.&lt;/p&gt;

&lt;h2&gt;
  
  
  AudioContext fingerprinting
&lt;/h2&gt;

&lt;p&gt;Another way to generate a unique device identifier is audio fingerprinting. This method uses the Web Audio API, but not for recording from a microphone or playing sound. Everything happens entirely inside the browser, and the user doesn’t notice a thing.&lt;/p&gt;

&lt;p&gt;The script generates and processes a synthetic audio signal, then extracts numeric values that reflect characteristics of the hardware and software environment. The result is a stable “audio” identifier, similar to a Canvas hash, but based on sound data.&lt;/p&gt;

&lt;p&gt;Here’s the idea behind it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;AudioContext.&lt;/strong&gt; The script initializes a hidden audio context, usually an &lt;code&gt;OfflineAudioContext&lt;/code&gt;. Think of it as a virtual sound processor that runs calculations in memory without sending anything to your speakers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signal generation.&lt;/strong&gt; Inside this context, an oscillator (like &lt;code&gt;OscillatorNode&lt;/code&gt;) produces a signal at a fixed frequency, often around 1000 Hz. This is a clean, synthetic tone generated directly in the browser.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Effects processing.&lt;/strong&gt; To make differences more noticeable, the signal is passed through effects. A common choice is a compressor (&lt;code&gt;DynamicsCompressorNode&lt;/code&gt;), which alters the waveform. By tweaking parameters like threshold, ratio, attack, and release, the output becomes dependent on the system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rendering and reading.&lt;/strong&gt; The audio context processes a short chunk of sound. Once rendering is done, the script gets an array of sample values. For example, at 44,100 Hz, about 0.11 seconds of audio is roughly 5,000 data samples.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fingerprint computation.&lt;/strong&gt; The sample array is reduced to a compact number. One simple approach is summing the absolute values and taking the most significant digits. That number becomes the audio fingerprint.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here’s a simple example you can run in your browser console to generate your own audio fingerprint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;AC&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;OfflineAudioContext&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;webkitOfflineAudioContext&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;AC&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;44100&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;osc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createOscillator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'triangle'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;frequency&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;comp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createDynamicsCompressor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;knee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ratio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attack&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;release&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="n"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;comp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;destination&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;osc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;rendered&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;startRendering&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;rendered&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getChannelData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;demo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;acc&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;1e6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1e6&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;buf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;byteOffset&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;byteOffset&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;byteLength&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;hashBuf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'SHA-256'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;hashHex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hashBuf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;padStart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'0'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Audio demo sum:'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;demo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Audio SHA-256 :'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hashHex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the example below, the value matched in Chrome and Opera (953.152941). Both browsers are Chromium-based, so it is worth testing engines such as Firefox and Safari before drawing general conclusions. You can run the script yourself and check your own result.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdbyjoewwm5qej71lbajc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdbyjoewwm5qej71lbajc.png" alt="DevTools console with the audio fingerprint script output in the first browser: demo sum 953.152941 and a SHA-256 hash" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;![DevTools console with the audio fingerprint script output in the second browser: the same demo sum 953.152941 and the same SHA-256 hash]](&lt;a href="https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/ei11rb4kokl08brznko9.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.us-east-2.amazonaws.com/uploads/articles/ei11rb4kokl08brznko9.png&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Browsers have started to introduce protections against this kind of tracking. Apple was one of the first to implement it: starting with Safari 17, the browser adds slight randomness to audio processing in private mode, which makes the fingerprint change from session to session. The same protection also covers 2D canvas and WebGL.&lt;/p&gt;

&lt;p&gt;In most other browsers, audio fingerprints can still be collected without much difficulty. When combined with Canvas and WebGL, they significantly increase the accuracy of device identification.&lt;/p&gt;

&lt;h2&gt;
  
  
  WebGL fingerprinting
&lt;/h2&gt;

&lt;p&gt;HTML5 WebGL gives the browser access to hardware-accelerated 3D rendering through a &lt;code&gt;canvas&lt;/code&gt; element with a WebGL context. It was originally designed for interactive graphics, but over time it has also become a powerful source of fingerprinting data.&lt;/p&gt;

&lt;p&gt;While Canvas captures differences in 2D rendering, WebGL goes deeper and operates at the GPU level. Because of this, it can reveal much more about the system, including the graphics card model, driver version, and subtle details of how a specific GPU behaves. In some cases, it can even distinguish between two machines with the same graphics hardware.&lt;/p&gt;

&lt;p&gt;A typical WebGL fingerprint is built in a few steps.&lt;/p&gt;

&lt;p&gt;First, the script initializes a WebGL context, for example via &lt;code&gt;canvas.getContext("webgl2")&lt;/code&gt;. At this stage, it can already access some basic environment data like the GPU vendor and renderer, driver details, and supported extensions.&lt;/p&gt;

&lt;p&gt;Next comes rendering. A hidden canvas is used to draw a 3D scene or a set of primitives. This usually involves shapes, shaders, lighting, and textures — enough to engage different parts of the graphics pipeline.&lt;/p&gt;

&lt;p&gt;Once rendering is complete, the script collects the output. It reads pixel data using methods like &lt;code&gt;gl.readPixels&lt;/code&gt; and queries various WebGL parameters such as supported extensions, maximum texture size, shader precision, and &lt;code&gt;VENDOR/RENDERER&lt;/code&gt; strings. Together, these values form a kind of snapshot of the graphics environment.&lt;/p&gt;

&lt;p&gt;Finally, all collected data is combined and hashed, often using something like SHA-256. The resulting hash becomes the WebGL fingerprint, which can then be sent to the server and reused to identify the same device across sessions.&lt;/p&gt;

&lt;p&gt;Here’s a simplified example of how such a hash can be generated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'canvas'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'webgl2'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;antialias&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;cv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'webgl'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;antialias&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'WebGL is not available'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;dbg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getExtension&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'WEBGL_debug_renderer_info'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dbg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vendor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dbg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;UNMASKED_VENDOR_WEBGL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;renderer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dbg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;UNMASKED_RENDERER_WEBGL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vendor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'(masked)'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;renderer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'(masked)'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="p"&gt;}&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;VERSION&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;glsl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;SHADING_LANGUAGE_VERSION&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;maxTex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;MAX_TEXTURE_SIZE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;vs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`
&amp;nbsp; &amp;nbsp; attribute vec2 p;
&amp;nbsp; &amp;nbsp; void main(){ gl_Position = vec4(p,0.0,1.0); }
&amp;nbsp; `&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;fs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`
&amp;nbsp; &amp;nbsp; precision highp float;
&amp;nbsp; &amp;nbsp; uniform vec2 u_res;
&amp;nbsp; &amp;nbsp; float h(vec2 v){
&amp;nbsp; &amp;nbsp; &amp;nbsp; float s = sin(dot(v, vec2(12.9898,78.233))) * 43758.5453;
&amp;nbsp; &amp;nbsp; &amp;nbsp; return fract(s);
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; void main(){
&amp;nbsp; &amp;nbsp; &amp;nbsp; vec2 uv = gl_FragCoord.xy / u_res;
&amp;nbsp; &amp;nbsp; &amp;nbsp; float r = h(uv + vec2(0.11,0.21));
&amp;nbsp; &amp;nbsp; &amp;nbsp; float g = h(uv*1.3 + vec2(0.31,0.41));
&amp;nbsp; &amp;nbsp; &amp;nbsp; float b = h(uv*1.7 + vec2(0.51,0.61));
&amp;nbsp; &amp;nbsp; &amp;nbsp; gl_FragColor = vec4(pow(vec3(r,g,b)*(0.6+0.4*uv.x), vec3(1.1)), 1.0);
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; `&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createShader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;shaderSource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compileShader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getShaderParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;COMPILE_STATUS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getShaderInfoLog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="s1"&gt;'shader error'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="p"&gt;}&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;pr&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createProgram&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attachShader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;VERTEX_SHADER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attachShader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;FRAGMENT_SHADER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;linkProgram&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getProgramParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;LINK_STATUS&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getProgramInfoLog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="s1"&gt;'link error'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;useProgram&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;buf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createBuffer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bindBuffer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ARRAY_BUFFER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;buf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;bufferData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ARRAY_BUFFER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Float32Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;STATIC_DRAW&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;loc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getAttribLocation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'p'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;enableVertexAttribArray&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;vertexAttribPointer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;loc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;FLOAT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ures&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUniformLocation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pr&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'u_res'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uniform2f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ures&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drawingBufferWidth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drawingBufferHeight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;viewport&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drawingBufferWidth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drawingBufferHeight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clearColor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;COLOR_BUFFER_BIT&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawArrays&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;TRIANGLES&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;w&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drawingBufferWidth&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;h&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;drawingBufferHeight&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readPixels&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;w&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;h&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;RGBA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;UNSIGNED_BYTE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;enc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TextEncoder&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;meta&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;enc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;full&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="n"&gt;full&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;full&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;hashBuf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;subtle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'SHA-256'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;full&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;buffer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;hex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hashBuf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;padStart&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;'0'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+=&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mh"&gt;0x9e3779b9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mh"&gt;0x85ebca6b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &amp;nbsp; &lt;span class="n"&gt;hi&lt;/span&gt; &lt;span class="o"&gt;^=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;hi&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;lo&lt;/span&gt; &lt;span class="o"&gt;^=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lo&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="p"&gt;}&lt;/span&gt;
&amp;nbsp; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;sample64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'00000000'&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;hi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'00000000'&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;lo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&amp;nbsp; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'WebGL vendor&amp;nbsp; :'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vendor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'WebGL renderer:'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;renderer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'WebGL version :'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'| GLSL:'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;glsl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'MAX_TEXTURE_SIZE:'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;maxTex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'SHA-256(meta+pixels):'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&amp;nbsp; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Sample64:'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sample64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's what we get: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7yasyxcvxzxkmois7xxn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7yasyxcvxzxkmois7xxn.png" alt="DevTools console with WebGL script output" width="799" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So what exactly does WebGL capture?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First of all, GPU identifiers. Different graphics cards expose different capabilities. Integrated Intel Graphics differ from discrete NVIDIA GeForce or AMD Radeon in terms of memory, supported extensions, and driver behavior. All of this is reflected in the WebGL context parameters.&lt;/p&gt;

&lt;p&gt;Then there are variations between seemingly identical devices. Even if two machines use the same GPU model, there can still be small hardware-level differences. WebGL can pick these up by measuring things like shader execution or by detecting subtle rendering artifacts at the pixel level.&lt;/p&gt;

&lt;p&gt;The browser itself also plays a role. Different engines such as Blink, WebKit, and Gecko handle WebGL calls slightly differently, which leads to small but consistent differences in the final output. That’s why the same WebGL fingerprint can vary across browsers, even on the same machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftcnbi4vbvzb5wfjilypt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftcnbi4vbvzb5wfjilypt.png" alt="DevTools console with WebGL script output: vendor Google Inc. (AMD), renderer ANGLE with AMD Radeon Graphics, MAX_TEXTURE_SIZE 16384" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WebGL fingerprints are often combined with Canvas and audio data for more robust tracking, but even on their own, they can reveal a surprisingly detailed picture of a user’s system.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to reduce fingerprinting risks
&lt;/h2&gt;

&lt;p&gt;Completely eliminating all fingerprinting vectors is almost impossible. There are simply too many signals a website can collect. Still, you can reduce how unique your setup looks and make tracking more difficult.&lt;/p&gt;

&lt;p&gt;One approach is using hardened browsers and privacy modes. Tor Browser is designed so that all users look the same. It restricts Canvas and WebGL and standardizes many environment parameters. This is effective, but often breaks modern websites.&lt;/p&gt;

&lt;p&gt;Brave Browser blocks many common fingerprinting techniques.&lt;/p&gt;

&lt;p&gt;Safari, in private browsing, adds noise to audio processing, making audio fingerprints less stable.&lt;/p&gt;

&lt;p&gt;Another option is blocking or spoofing extensions like CanvasBlocker. They prevent websites from reading Canvas data or return modified images. Similar tools exist for AudioContext. The downside is that very few users run these setups, so this kind of behavior can actually stand out. A completely blank Canvas or constantly changing noisy hash may look suspicious rather than anonymous.&lt;/p&gt;

&lt;p&gt;There’s also the idea of reducing uniqueness by standardizing the environment. For example, running a browser inside a virtual machine or cloud environment where multiple users share the same configuration. Some anti-fraud systems use similar approaches. In practice, though, this is not very convenient for everyday use.&lt;/p&gt;

&lt;p&gt;Another option is controlled spoofing. Anti-detect browsers let the user configure the environment so that values are consistent with each other, instead of blocking signals or randomizing them. Octo Browser is one such tool: it keeps a separate profile (fingerprint, proxy, cookies) per task and lets the user control the Canvas, WebGL and audio values a site sees.&lt;/p&gt;

&lt;p&gt;If the goal is maximum anonymity, it takes constant rotation of devices, browsers, and configurations, while keeping everything updated and minimizing extra signals. Even then, it only reduces risk to a certain extent.&lt;/p&gt;

&lt;p&gt;Promo code DEVTO gives new Octo Browser users 4 days of the Starter plan.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>tutorial</category>
      <category>javascript</category>
      <category>privacy</category>
    </item>
    <item>
      <title>How Browser Fingerprinting Works: Signals Sites Read</title>
      <dc:creator>Sid Wudraq</dc:creator>
      <pubDate>Mon, 02 Feb 2026 12:24:28 +0000</pubDate>
      <link>https://dev.to/octobrowser/how-browser-fingerprinting-works-3f87</link>
      <guid>https://dev.to/octobrowser/how-browser-fingerprinting-works-3f87</guid>
      <description>&lt;p&gt;A visitor clears cookies, opens a private window and still gets treated as a returning user. The site is not reading anything the visitor stored. It reads what the browser and the device reveal on every page load. How browser fingerprinting works comes down to one idea: dozens of small details that are individually common, such as operating system, browser version, language, time zone, screen settings and fonts, add up to a combination that rarely repeats. That makes it possible to track users&lt;/p&gt;

&lt;p&gt;The fingerprint is not guaranteed to be unique, but it is stable enough to recognise the same browser on later visits, including after cookies are cleared. Because it combines many parameters, changing one or two settings usually does not help. This article covers which signals are collected, how some of them can be read in the browser console, and where protection helps and where it stops.&lt;/p&gt;

&lt;h2&gt;
  
  
  How browser fingerprinting works: passive and active signals
&lt;/h2&gt;

&lt;p&gt;A browser fingerprint is built from many small parameters that together describe a device. Some of them are sent by the browser automatically with every HTTP request. These are the passive signals. Others are collected on the client side with JavaScript and Web APIs. These are the active signals.&lt;/p&gt;

&lt;p&gt;No single parameter identifies anyone: a Windows platform or an en-US language setting is shared by many users. The identifying power comes from the combination. Fingerprint check tools make this visible by listing each attribute next to a percentage, so rare values stand out. Changing one setting changes one input, while the rest of the profile stays the same and the browser remains recognizable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2mykx1ha70d40uv2nwt7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2mykx1ha70d40uv2nwt7.png" alt="Digital fingerprint check" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Passive parameters (HTTP headers and connection)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;IP address&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every request carries the source IP address. Through WHOIS and GeoIP databases it gives an approximate location: country, city and ISP. An IP is often shared by several users of the same provider and changes over time, so on its own it is rarely stable. Combined with other signals it still raises uniqueness considerably. If WebRTC is available, a script can reveal the real IP with a STUN request, which makes identification more accurate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User-Agent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The browser sends a User-Agent string that describes the browser type and version, operating system, architecture, and sometimes the device model:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
The User-Agent helps quickly classify a user by browser and platform. While it is easy to spoof, in real-world fingerprints it is still one of the key attributes. Some extensions also add their own headers, which can reveal installed plugins or frameworks. Uncommon combinations of operating systems and browser versions are more likely to stand out and expose the user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fox46qy1mzz0jdembyoln.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fox46qy1mzz0jdembyoln.png" alt="User agent" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accept headers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With every request the browser sends headers that describe what it can handle: &lt;strong&gt;Accept&lt;/strong&gt; for content types, &lt;strong&gt;Accept-Language&lt;/strong&gt; for preferred languages and *&lt;em&gt;Accept-Encoding *&lt;/em&gt; for supported compression, plus cache-related headers and referrer information.&lt;/p&gt;

&lt;p&gt;Details inside these values carry information. The order of locales in Accept-Language can reflect system or regional settings. &lt;strong&gt;Accept-Encoding: br&lt;/strong&gt; (Brotli) usually points to a modern browser. The order in which headers are sent is often tied to a specific browser engine, because different engines construct requests in slightly different sequences, and that order becomes one more identifying signal. From these headers a server can infer the client type, the preferred interface languages, supported image formats and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fav7oylooo9jjqd61empx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fav7oylooo9jjqd61empx.png" alt="Accept headars in broser fingerprinting" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supported technologies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some headers indicate the capabilities of the browser—for example, &lt;strong&gt;&lt;em&gt;DNT&lt;/em&gt;&lt;/strong&gt; (Do Not Track) or &lt;em&gt;&lt;strong&gt;Upgrade-Insecure-Requests&lt;/strong&gt;&lt;/em&gt;. Having &lt;strong&gt;&lt;em&gt;DNT&lt;/em&gt;&lt;/strong&gt; enabled is relatively rare and can make a profile more noticeable. These attributes are seldom used on their own, but when combined with other signals, they contribute to the overall uniqueness of the browser fingerprint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timezone&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The most accurate way to determine a user’s timezone is through an active method using JavaScript, which directly returns the offset from UTC. Even without scripts, the server can make an approximate estimate—for example, by comparing the &lt;strong&gt;&lt;em&gt;Date&lt;/em&gt;&lt;/strong&gt; header or log timestamps with client-side data like &lt;strong&gt;&lt;em&gt;If-Modified-Since&lt;/em&gt;&lt;/strong&gt;. Differences in time can sometimes reveal the user’s timezone.&lt;/p&gt;

&lt;p&gt;Usually, the timezone is obtained directly from the browser, providing a precise value. The offset from GMT (for example, GMT+3) is a stable characteristic: it varies between regions and generally stays the same for a single device unless the user travels or manually changes the settings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Active parameters (JavaScript and Web APIs)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Screen resolution and color depth&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;These parameters are read via the &lt;strong&gt;&lt;em&gt;window.screen object&lt;/em&gt;&lt;/strong&gt;. The &lt;strong&gt;&lt;em&gt;screen.width&lt;/em&gt;&lt;/strong&gt; and &lt;em&gt;&lt;strong&gt;screen.height&lt;/strong&gt;&lt;/em&gt; properties show the available screen resolution (sometimes already adjusted for system scaling), while &lt;em&gt;&lt;strong&gt;screen.colorDepth&lt;/strong&gt;&lt;/em&gt; indicates color depth—most commonly 24 or 32 bits. These values are almost always included in a browser fingerprint because there are many possible combinations, and users’ displays vary widely.&lt;/p&gt;

&lt;p&gt;On desktop devices, the browser window size usually does not match the actual screen size, so fingerprinting systems typically use the maximum available resolution, which reflects the real monitor settings.&lt;/p&gt;

&lt;p&gt;Common combinations like 1920×1080×24 or 1366×768×24 already help split devices into distinct groups. Any change in setup—such as switching monitors, changing resolution, or connecting a second display—updates these values and, as a result, changes the overall fingerprint.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmhwdf856q39em0yyu0al.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmhwdf856q39em0yyu0al.png" alt="browser fingerprinting: screen resolution" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Language settings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Browsers have several language-related parameters: the system interface language, the preferred language for websites, and the locale, which determines date, number, and other regional formats. These values can be accessed via JavaScript, for example through &lt;strong&gt;&lt;em&gt;navigator.language&lt;/em&gt;&lt;/strong&gt; or &lt;strong&gt;&lt;em&gt;navigator.languages&lt;/em&gt;&lt;/strong&gt;. Values like &lt;em&gt;&lt;strong&gt;"ru-RU"&lt;/strong&gt;&lt;/em&gt; or &lt;em&gt;&lt;strong&gt;"en-US"&lt;/strong&gt;&lt;/em&gt; usually match what the server receives in the &lt;strong&gt;&lt;em&gt;Accept-Language&lt;/em&gt;&lt;/strong&gt; header. The locale also affects how the browser displays dates—month names, time format, and other elements—which provides an additional signal for trackers.&lt;/p&gt;

&lt;p&gt;In terms of uniqueness, language settings add noticeable variation. A user might have a Russian system interface (&lt;strong&gt;&lt;em&gt;ru-RU&lt;/em&gt;&lt;/strong&gt;), a Ukrainian one (&lt;strong&gt;&lt;em&gt;uk-UA&lt;/em&gt;&lt;/strong&gt;), or an English interface (&lt;strong&gt;&lt;em&gt;en-US&lt;/em&gt;&lt;/strong&gt;) while still being a Russian speaker.&lt;/p&gt;

&lt;p&gt;While common languages are shared by many users and don’t provide absolute uniqueness on their own, in combination with other characteristics they help create distinct profiles. For example, they can distinguish a Chrome on Windows with Russian locale from the same Chrome version on Windows with German settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffp2e80i3e696edy7xzdf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffp2e80i3e696edy7xzdf.png" alt="Browser fingerprinting: language settings" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timezone (via JavaScript)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A timezone can be determined using &lt;strong&gt;&lt;em&gt;new Date().getTimezoneOffset(&lt;/em&gt;&lt;/strong&gt;), which returns the difference from UTC in minutes. For GMT+3, this value is around 180. The Intl API can also provide the timezone as a string identifier. Timezone is almost always included in a browser fingerprint because it is stable and clearly differentiates users from different regions. Even if other parameters match, different timezones result in different profiles.&lt;/p&gt;

&lt;p&gt;Some advanced tracking systems monitor changes in this value, which can indicate that the browser is the same but the user has changed time settings. In standard fingerprinting, however, only the current offset is usually taken into account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Platform and CPU information&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Websites can obtain a range of technical details about a device through the &lt;strong&gt;navigator&lt;/strong&gt; object.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;navigator.platform&lt;/strong&gt; returns a string indicating the operating system or architecture, such as Win32, Linux x86_64, or iPhone. In the past, this parameter clearly distinguished platforms, but modern browsers often mask it for privacy reasons. When available, it becomes part of the fingerprint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;navigator.hardwareConcurrency&lt;/strong&gt; reports the number of logical CPU threads. On mobile devices this is usually 4–8, while on desktops it can be 4, 8, 12, 16, or more. Unusual values like 6 or 10 tend to stand out and make a device more distinctive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;navigator.deviceMemory&lt;/strong&gt; provides an approximate amount of RAM in gigabytes (in Chrome it is usually rounded, for example to 8). This parameter is not supported everywhere, but when present it significantly increases fingerprint variability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;navigator.oscpu&lt;/strong&gt; is Firefox-specific and largely duplicates OS information, so it is rarely used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;navigator.webdriver&lt;/strong&gt; indicates whether the browser is being controlled by automation. It does not add entropy to the fingerprint, but a true value clearly separates automated browsers from regular users, indirectly contributing to identification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fth8swxddcg06mpn2k42x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fth8swxddcg06mpn2k42x.png" alt="Info about CPU" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cookies and Web Storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Checking &lt;strong&gt;navigator.cookieEnabled&lt;/strong&gt; shows whether cookies are disabled. This is quite rare and can serve as a distinguishing signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Plugin list&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;navigator.plugins&lt;/strong&gt; is almost empty in most modern browsers, but its state (full, partial, or empty) can still be used. In the past, the plugin list provided very high uniqueness; today it is more of an auxiliary signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installed extensions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although browsers do not directly expose a list of installed extensions, many can be detected indirectly. Ad blockers reveal themselves by blocking specific requests or modifying the DOM. Some extensions leave unique objects on the &lt;strong&gt;window&lt;/strong&gt; object, making them easy to identify. A combination of such signals allows a website to build an approximate profile of installed extensions. Even a single popular ad blocker or password manager can noticeably increase fingerprint uniqueness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Installed fonts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The set of system fonts varies greatly depending on the operating system, installed software, and locale, which makes it a strong source of uniqueness. Available fonts can be detected without Flash, using CSS+JS or Canvas.&lt;/p&gt;

&lt;p&gt;With CSS, a hidden element is assigned a font stack and its dimensions are measured—changes indicate whether a specific font is installed. A faster approach uses Canvas: text is rendered with a chosen font, and pixel differences reveal its presence. Since there are countless font combinations and rare fonts stand out immediately, this parameter is especially valuable for fingerprinting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Canvas fingerprinting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is one of the most well-known fingerprinting techniques, based on how a device renders graphics in the HTML5  element. A script draws text and simple shapes, then reads the result via &lt;strong&gt;canvas.toDataURL()&lt;/strong&gt; and converts it into a hash—the Canvas fingerprint.&lt;/p&gt;

&lt;p&gt;Uniqueness comes from many subtle differences: font rendering and anti-aliasing, driver versions, operating system, and graphics hardware. Even with identical code, two devices almost always produce slightly different bitmaps.&lt;/p&gt;

&lt;p&gt;Typically, scripts draw text with various characters or add colored shapes and shadows to trigger as many rendering features as possible. The fingerprint may change after driver updates or a GPU change, but together with WebGL it remains one of the most informative signals.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsqizcdsb07nr7xhf6h7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsqizcdsb07nr7xhf6h7i.png" alt="Canvas fingerprinting" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WebGL fingerprinting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;WebGL provides access to graphics subsystem data, which is why it is widely used for fingerprinting. Through the &lt;strong&gt;_WEBGL_debug_renderer_info&lt;/strong&gt; extension, a website can obtain the GPU vendor and model—essentially a direct identifier of the graphics card, which greatly increases profile uniqueness.&lt;/p&gt;

&lt;p&gt;Even without exposing the adapter name, WebGL returns many numeric parameters that depend on drivers and hardware, such as buffer sizes, the number of supported textures, and shader limits. By collecting these values, trackers build a characteristic “capability vector” of the device.&lt;/p&gt;

&lt;p&gt;Similar to Canvas fingerprinting, a scene can also be rendered and the output hashed to detect even subtler differences. When combined with Canvas, WebGL becomes one of the strongest fingerprinting signals, which is why privacy-focused browsers try to hide or distort this data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mk4j92vx4pmplwsj1b2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9mk4j92vx4pmplwsj1b2.png" alt="WebGL fingerprinting" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AudioContext fingerprinting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This method uses the Web Audio API to generate a unique “audio fingerprint.” Different combinations of browser, operating system, and hardware process and generate sound slightly differently due to variations in audio libraries, drivers, and floating‑point calculations. These tiny differences produce a stable but distinctive result for each device.&lt;/p&gt;

&lt;p&gt;An audio fingerprint strengthens overall identification: even if Canvas and WebGL fingerprints match, audio data often makes it possible to tell two otherwise similar profiles apart.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Media devices and sensors&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Scripts can also collect information about connected hardware. Using &lt;strong&gt;navigator.mediaDevices.enumerateDevices()&lt;/strong&gt;, a site can determine the number of cameras and microphones— even without device names, this already adds a fingerprinting signal.&lt;/p&gt;

&lt;p&gt;In the past, additional APIs such as the Battery Status API were used to expose battery level and remaining time, but they were restricted due to privacy concerns.&lt;/p&gt;

&lt;p&gt;Motion and orientation sensors provide further differences: update frequency, the presence of specific sensors, and data formats vary between devices. These signals are especially noticeable on uncommon hardware. In practice, dozens of such parameters are combined into a structured dataset and hashed (for example, with MurmurHash) to produce a short device identifier.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to prevent browser fingerprinting: what browsers and extensions do
&lt;/h2&gt;

&lt;p&gt;Modern browsers try to reduce the amount of data that can be collected, and they take different approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tor Browser&lt;/strong&gt; makes users as similar as possible: a unified User-Agent, a fixed window size, a limited set of fonts and restrictions on Canvas and AudioContext.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Firefox&lt;/strong&gt; offers the &lt;code&gt;privacy.resistFingerprinting&lt;/code&gt; mode, which also standardizes many parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Brave&lt;/strong&gt; blocks trackers by default and adds noise to key APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extensions&lt;/strong&gt; such as CanvasBlocker and Privacy Badger interfere with fingerprint collection in specific areas.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full protection is not possible, because a browser has to expose a lot of information to render pages at all. Two strategies follow from the list above: make many users look identical, as Tor does, or change values so that the whole profile differs. Changing one or two parameters rarely helps, because the remaining signals still match. The complete configuration has to change, not individual values.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;A browser fingerprint combines passive signals, such as IP address, User-Agent and Accept headers, with active ones read through JavaScript: screen, language, timezone, hardware, fonts, Canvas, WebGL and audio. Each value is common on its own, but together they make a browser recognizable without cookies. Browsers and extensions reduce what is exposed without removing it, and partial changes leave most of the profile intact. The console snippet above is a quick way to see how much a single page load can reveal.&lt;/p&gt;

&lt;p&gt;Promo code DEVTO gives new users 4 days of the Starter plan.&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
