Firefox CPU spike after visiting specific sites? Here's the fix
Certain web pages, especially those with heavy JavaScript or ads, can peg Firefox CPU usage to 100%. The fix is usually disabling hardware acceleration or clearing the GPU cache.
You're not alone — this drives everyone crazy
You visit a site — news, social media, some bloated dashboard — and suddenly Firefox eats 100% of your CPU. Fans spin up. Laptop gets hot. Everything else slows to a crawl. I've seen this on Windows 10, Windows 11, and even Linux Mint. The culprit is almost always the browser's hardware acceleration layer fighting with your GPU driver or a specific page's rendering code.
The fix that works 90% of the time
Don't bother reinstalling Firefox or running a malware scan first. Here's what actually works:
- Disable hardware acceleration – Go to
about:preferences#general, scroll to Performance. Uncheck Use recommended performance settings, then uncheck Use hardware acceleration when available. Restart Firefox. - Clear the GPU cache – Type
about:supportin the address bar. Next to Graphics, click Clear GPU cache. - Disable WebRender – In
about:config, search forgfx.webrender.alland set it tofalse.
Test by revisiting the problem page. If CPU drops back under 20%, congrats — you're done.
Why this works
Firefox's hardware acceleration offloads rendering to your GPU. Sounds great until the GPU driver has a bug with a specific CSS animation, WebGL canvas, or video codec. Then the browser falls into a spin loop — trying to render frames, failing, trying again. CPU goes nuclear because the fallback path uses software rendering inefficiently. Disabling acceleration forces Firefox to use its own software renderer, which is actually more stable for most consumer GPUs (especially Intel integrated and older NVIDIA cards). Clearing the GPU cache removes any corrupted cached shaders that might be triggering the loop.
One real-world example: a user on Windows 10 with an Intel UHD 620 would get 100% CPU on The Guardian homepage. The site uses a sticky video player with auto-play. Firefox + Intel driver + that player = infinite render fail loop. Disabling acceleration fixed it in 30 seconds.
Less common variations (when the main fix doesn't work)
Problem: CPU spike only on one specific site
This is almost always a rogue extension. Disable all extensions (about:addons), then re-enable one at a time. Ad blockers like uBlock Origin are usually fine, but script managers (NoScript, Tampermonkey) or old toolbar-style extensions can cause this. Also check for a site's service worker — open DevTools (F12), go to Application tab, Service Workers, and unregister any for that site.
Problem: CPU stays high even after closing the tab
That's a stuck background page or a hung extension. Open about:processes — you'll see a list of all Firefox processes. Sort by CPU. If you see a process still pegged, click End Process. The culprit is often a video player tab that didn't fully shut down its WebGL context.
Problem: CPU spikes on YouTube or other video sites
Disable VP9 hardware decoding. In about:config, set media.webm.hw_decoding.enabled to false. Also set media.hardware-video-decoding.enabled to false. This forces Firefox to use software decoding, which is actually more reliable for 1080p and below. 4K might stutter, but your CPU won't melt.
Problem: CPU usage stays high after the fix works for a day
Your GPU driver got updated automatically. Yes, Windows Update silently replaced your driver. Roll back the driver in Device Manager or install the OEM's stable version (e.g., from Intel's site, not Windows Update). Then re-apply the hardware acceleration fix.
Prevention — stop this from coming back
Once you've fixed it, do this:
- Keep Firefox updated. They've improved WebRender's fallback handling in v115+.
- Set
gfx.webrender.compositor.force-disabledtotrueinabout:config. This prevents the compositor from trying to use the GPU when it's clearly not working right. - Install an extension like Auto Tab Discard — it unloads tabs you haven't touched in 30+ minutes, freeing CPU and RAM.
- If you're on a laptop, set your power plan to Balanced or Power Saver. High Performance keeps the GPU clocked high even when idle, making spikes worse.
And honestly? If a specific site keeps doing this, block its service workers with uBlock Origin's dynamic filtering. Right-click the page, Block element, filter on service-worker.js. Saves you the headache.
Was this solution helpful?