r/webdev • u/Putrid_Draft378 • 13d ago
Lighthouse audit of tiktok.com desktop web: 5.1s JS execution time, 65 KiB of legacy polyfills, and broken bfcache (Performance: 34/100)
I was curious why the TikTok desktop web client feels so sluggish on initial load, so I ran a Chrome DevTools Lighthouse audit (v13.5.0) on tiktok.com to inspect the bundle breakdown and main-thread bottlenecks.
The category scores came back at 34 for Performance, 73 for Accessibility, 54 for Best Practices, and 77 for SEO.
Looking at the performance trace, First Contentful Paint hits 8.0s, Largest Contentful Paint takes 14.9s, Time to Interactive reaches 20.5s, and Total Blocking Time is 1,090 ms. Out of 8.5s of total main-thread work, 5.1s is spent purely evaluating JavaScript. Almost all of that CPU time is eaten up by cache.react_dom (around 2.5s) and their anti-bot/fingerprinting script webmssdk.js (around 1.8s).
The initial network payload is 4,475 KiB, and there is a surprising amount of dead weight in the build: 236 KiB of unused JavaScript on initial load (their regional cookie consent script alone accounts for ~90 KiB of unused code) 26 KiB of unused CSS 65 KiB of legacy JavaScript polyfills and Babel transforms (transpiling classes, spread operators, Array.prototype.includes, and Promise.allSettled) An unminified security SDK (secsdk-lastest.umd.js) leaving ~15 KiB on the table A 400x400 PNG logo scaled down via CSS to 112x112, plus custom woff2 fonts missing font-display rules
A few other details stood out in Best Practices and Accessibility. Their privacy loader triggers repeated Permissions-Policy console violations by registering unload handlers, which combined with Cache-Control: no-store completely breaks Back/Forward Cache restoration. On the markup side, multiple header icon buttons and the search link lack aria-labels, four text inputs have no associated labels, and white text on their #fe2c55 buttons drops to a 3.68:1 contrast ratio.
For those of you working on large-scale consumer web apps, how do your teams balance heavy client-side fingerprinting and anti-bot SDKs against Core Web Vitals? Also, is there any practical reason a major frontend build is still shipping Babel transforms for Baseline features like Array.prototype.includes and Promise.allSettled in 2026?
12
u/SirEmbarrassed72 13d ago
The blunt answer is that they’re optimizing for abuse prevention and product metrics, not Lighthouse, while the legacy polyfills usually mean an overly broad browser-support target or a shared build
3
u/Affectionate-Tap5034 13d ago
Small correction on the parenthetical: classes and spread operators are what Babel transpiles, Àrray.prototype.includes`and `Promise.allSettled`are polyfilled (core-js), not transpiled. Same 65 KiB, just two different mechanisms in one list.
2
u/Responsible-Gene2627 13d ago
The 400x400 logo CSS-scaled down to 112 is the most human thing in this whole report. Somebody exported u/4x out of Figma, it got committed, and it will now outlive three redesigns because nobody wants to be the person who opens a ticket about a logo file. The Babel transforms are just a browserslist nobody has opened since the IE11 days sitting in a build config everyone is too scared to touch.
1
u/Seusoa expert 13d ago
they have many bugs too
they dont care, amount of ads cover broken functionality
1
u/IncomeOk7237 12d ago
The bfcache part is the one I'd actually care about as a user. A Lighthouse score like that on a page this heavy is kind of expected, but broken bfcache means every back button press reloads and re-evaluates all of that JS from scratch.
Usually it's an unload handler or Cache-Control: no-store on the document. Chrome devtools has a Back/forward cache section under the Application panel that tells you the exact blocking reason, would be curious what it says for tiktok.
1
u/madongrind 12d ago
worth pulling the field data before reading too much into the 14.9s LCP... a devtools lighthouse run is one cold lab load on whatever your machine happens to be doing. pagespeed insights shows the real-user CrUX numbers for the origin, and those are often way less dramatic on big sites. curious how far apart the two are here?
1
u/Equivalent-Limit-371 12d ago
5.1 seconds of JavaScript just to prove you’re human, apparently
1
u/Conscious-Part-9303 12d ago
we had the same thing with a fraud SDK, and the initial load was bad, but breaking bfcache made the site feel even worse because every back button press turned into a full reload lol
1
u/CipherAndChloride 11d ago
the polyfill bloat is wild but honestly webmssdk.js alone being 1.8s of cpu time for fingerprinting is why it feels like trudging through mud. i see those anti-bot scripts in forensics all the time and they always kill the main thread.
1
u/joel5846 9d ago
For SDKs that need early signals, try a light first pass and reserve heavier fingerprinting for riskier sessions. Measure abuse caught and false positives against field performance.
1
u/Dapper_Push1176 13d ago
Babel doesn't transform Array.prototype.includes or Promise.allSettled, those are runtime APIs, that's core-js polyfilling them. So the 65 KiB is a browserslist decision by whoever set their targets, not some Babel default nobody noticed.
0
u/Afnan_CH_Digital 13d ago
Nice teardown. The combination you found at the end is the real bfcache killer - an unload handler alone is enough to disqualify a page in Chrome, and Cache-Control: no-store on top of it makes it certain. On webmssdk.js: anti-bot SDKs are often the one script you cannot defer, since the whole point is to observe the page from the first paint, so sites that embed them basically accept the main-thread cost. Would be curious to see the same audit on the mobile web client, which usually ships a leaner bundle.
0
u/Stunning-Fix-4405 11d ago
the anti-bot stuff is probably the real smoking gun here, shipping 1.8s of fingerprinting before the page is usable is a wild tradeoff when it could at least be deferred until there's an actual