Skip to content

Instantly share code, notes, and snippets.

@GunGunGun
Forked from RubenKelevra/fast_firefox.md
Created February 4, 2023 18:29
Show Gist options
  • Save GunGunGun/eb6d21e2290fbc6c6505379c6b0f94e9 to your computer and use it in GitHub Desktop.
Save GunGunGun/eb6d21e2290fbc6c6505379c6b0f94e9 to your computer and use it in GitHub Desktop.
Make Firefox fast again

Recommended Extentions:

uBlock Origin

https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/

Go to settings and make sure the following are OFF:

  • "Disable pre-fetching (to prevent any connection for blocked network requests)"
  • "Disable hyperlink auditing"

JSLibCache

https://addons.mozilla.org/en-US/firefox/addon/jslibcache/

Make sure "Allow header modification" is on.

Go to the uBlock rules, copy, enter them under uBlock settings, save and commit.

LocalCDN

https://addons.mozilla.org/en-US/firefox/addon/localcdn-fork-of-decentraleyes/

Go to settings and make sure the following are OFF:

  • Disable link prefetching
  • Advanced -> Block requests for missing resources
  • Advanced -> Block Google Fonts

Go to settings and make sure the following are ON:

  • Advanced -> Invert HTML filter

Go to settings -> Advanced, export the uBlock rules and copy, enter them under uBlock settings, save and commit.

Cache Longer

https://addons.mozilla.org/en-US/firefox/addon/cache-longer/

Set and forget.

Recommended Browser settings

Go to about:preferences#privacy

Select "Custom", then deactivate all filters.

Scroll down and deactivate "Block dangerous and deceptive content".

Go to about:config:

General tweaks

network.captive-portal-service.enabled = false # don't try to find captive portals
network.notify.checkForProxies = false # don't try to find proxies

Browser cache

browser.cache.disk.capacity = 8192000 # 8 GB cache on disk
browser.cache.disk.smart_size.enabled = false # disable adaptive cache size on disk
browser.cache.frecency_half_life_hours = 128 # lower cache sweep intervals
browser.cache.max_shutdown_io_lag = 16 # let the browser finish more io on shutdown
browser.cache.memory.capacity = 2097152 # fixed maximum 2 GB in memory cache
browser.cache.memory.max_entry_size = 327680 # maximum size of in memory cached objects

GFX rendering tweaks:

gfx.canvas.accelerated = true
gfx.canvas.accelerated.cache-items = 32768	
gfx.canvas.accelerated.cache-size	= 4096	
layers.acceleration.force-enabled = true
gfx.content.skia-font-cache-size = 80	
gfx.webrender.all = true	
gfx.webrender.compositor = true	
gfx.webrender.compositor.force-enabled = true	
gfx.webrender.enabled = true	
gfx.webrender.precache-shaders = true	
gfx.webrender.program-binary-disk =true
gfx.webrender.software.opengl = true
image.mem.decode_bytes_at_a_time	65536	
image.mem.shared.unmap.min_expiration_ms	120000	
layers.gpu-process.enabled	true	
layers.gpu-process.force-enabled	true
image.cache.size = 10485760
media.memory_cache_max_size	= 1048576	
media.memory_caches_combined_limit_kb	= 3145728
media.hardware-video-decoding.force-enabled	= true
media.ffmpeg.vaapi.enabled = true

More network predictions

network.dns.disablePrefetchFromHTTPS = false	
network.dnsCacheEntries = 20000	
network.dnsCacheExpiration = 3600	
network.dnsCacheExpirationGracePeriod = 240	
network.predictor.enable-hover-on-ssl	= true	
network.predictor.enable-prefetch	= true	
network.predictor.preconnect-min-confidence	= 20	
network.predictor.prefetch-force-valid-for = 3600	
network.predictor.prefetch-min-confidence = 20	
network.predictor.prefetch-rolling-load-count = 120	
network.predictor.preresolve-min-confidence = 10

Faster SSL

network.ssl_tokens_cache_capacity = 32768 # more TLS token caching (fast reconnects)

Disable network seperations

fission.autostart	= false # disable enhanced protection between threads/processes of the browser
privacy.partition.network_state	= false # don't seperate the network state (e.g. the cache) by top level domains)

Finishing touches:

  • Clean the browser cache
  • Restart firefox

Go to about:support then scroll down to "Places Database" and select "Verify Integrity". This will rewrite the database.

Scroll up again and select "Clear startup cache" on the right side.

  • Restart firefox

Nice to have extensions

I don't care about cookies

https://addons.mozilla.org/en-US/firefox/addon/i-dont-care-about-cookies/

Set and forget.

Bypass Paywalls Clean

https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean/

Automatically bypass some paywalls.

Downside: Needs often new permissions, if an update adds a site to the supported list. - You'll get notified with an ! mark on your "hamburger menu" icon.

Consent-O-Matic

https://addons.mozilla.org/en-US/firefox/addon/consent-o-matic/

Set and forget.

Cookie AutoDelete

https://addons.mozilla.org/en-US/firefox/addon/cookie-autodelete/

Go to settings and make sure the following are OFF:

  • Show Notification After Automatic Cleanup
  • Enable Support for Container Tabs

SponsorBlock - Skip Sponsorships on YouTube

https://addons.mozilla.org/en-US/firefox/addon/sponsorblock/

Configure skip categories to your likings.

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