Skip to content

Tech detection: inline loaders behind LiteSpeed, Rocket Loader or a large Next.js flight script are no longer read (Clarity −29 sites since v0.0.149) #1435

Closed

Description

@nc9

What happens

Since v0.0.149 (9667894, the second half of the #1430 fix), pageMarkup keeps a <script> body only when it is at most 16 KB and its type matches JS_SCRIPT_TYPE. Three common ways real sites ship an inline loader fall outside that, so a script-url detector that matched them in v0.0.147 no longer does.

Measured offline on 5,377 sites of our crawl corpus, corpus caps, v0.0.149 vs v0.0.147: Microsoft Clarity found on 29 fewer sites, 9 more. Where clarity.ms sits on the lost sites:

Where the loader is Sites Real install?
Next.js App Router flight payload: untyped <script>self.__next_f.push(...) over 16 KB (the layout's next/script snippet, on every page) 16 yes
type="litespeed/javascript" (LiteSpeed Cache delays every script this way); body starts (function(clarity 3 yes
type="<hash>-text/javascript" (Cloudflare Rocket Loader) 1 yes
only in a CSP <meta> or page text 4 no, correctly dropped

The same three shapes hide any other inline-loader vendor (GA4, GTM, Meta Pixel, Hotjar...).

Expected

A loader that the browser will run is read, whatever deferral wrapper the site's cache or CDN puts on it. Data blocks, prose and whole inlined bundles stay excluded, as #1430 intended.

Acceptance Criteria

nik

Activity

  1. added
    bug
    size: S
    on Oct 31, 2026
  2. added theissue type on Oct 31, 2026
  3. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Whole-corpus numbers (33,967 sites, corpus caps, v0.0.149 vs v0.0.147): Clarity is found on 153 fewer sites and 117 more. The same pageMarkup change also costs vue 56, google-ads 46, posthog 37, react 33, threejs 32, stripe 30, square 27, bootstrap 20, unpkg 19, google-adsense 17, google-analytics-4 15, cloudflare-turnstile 13 and recaptcha 12.

    I probed the Clarity losses: most are the three loader shapes in the table above. The other detectors are unprobed. They probably fall into the same shapes, but some will be prose or link mentions that #1430 meant to drop. Contentful's −312 is the intended fix (prose, <a>, JSON-LD, __nuxt_data__).

    A regression test should cover a script-url vendor in each shape, not only Clarity.

    nik

  4. nc9 commented on Oct 31, 2026

    @nc9
    ContributorAuthor

    Shipped in v0.0.150 (d88f1724 404efa2a b9c44002), verified against main: every acceptance criterion is met (the litespeed, Rocket Loader and over-16 KB flight-script shapes each detect Clarity with a fixture, and the #1430 negative cases stay green). #1437 tracks narrowing the flight-script read. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.150

    nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions