# uBlock | Raymond Hill | Knowledge Base | Instagit

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.

GitHub Stars: 61.9k

Repository: https://github.com/gorhill/uBlock

---

## Articles

### [What Is the `$csp=` Option in uBlock Origin Filters? A Complete Technical Guide](/gorhill/uBlock/what-is-the-csp-option-in-ublock-origin-filters)

Learn how the unique $csp= option in uBlock Origin lets you inject custom Content-Security-Policy headers for server-side control of website resources and scripts.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin Handles DOM Mutations for Cosmetic Filtering](/gorhill/uBlock/how-does-ublock-origin-handle-dom-mutations-for-cosmetic-filtering)

Discover how uBlock Origin efficiently handles DOM mutations for cosmetic filtering using MutationObserver and temporary stylesheets to block elements.

- Tags: internals
- Published: 2026-03-05

### [What Is the Element Picker in uBlock Origin? Interactive Filter Creation Explained](/gorhill/uBlock/what-is-the-purpose-of-the-element-picker-in-ublock-origin)

Discover the uBlock Origin element picker. Easily create custom blocking rules by clicking web elements. Simplify ad blocking with interactive filter creation.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin's Scriptlet Injector Safely Evaluates Code: Architecture and Implementation](/gorhill/uBlock/how-does-the-scriptlet-injector-safely-evaluate-code-in-ublock-origin)

Discover how uBlock Origin's scriptlet injector safely evaluates code using sentinel verification and automatic Blob URL fallback even with blocked inline scripts.

- Tags: architecture
- Published: 2026-03-05

### [What Are Element Hiders in uBlock Origin Content Scripts?](/gorhill/uBlock/what-are-element-hiders-in-ublock-origin-content-scripts)

Discover how element hiders in uBlock Origin content scripts use CSS rules to hide unwanted DOM elements. Learn to customize your browsing experience.

- Tags: internals
- Published: 2026-03-05

### [How to Programmatically Add Dynamic Filter Rules in uBlock Origin](/gorhill/uBlock/how-can-i-programmatically-add-dynamic-filter-rules-in-ublock-origin)

Learn how to programmatically add dynamic filter rules in uBlock Origin. This guide explains using the Chromium declarativeNetRequest API for advanced filtering.

- Tags: how-to-guide
- Published: 2026-03-05

### [What Is the no-large-media Switch in uBlock Origin? Per-Site Media Blocking Explained](/gorhill/uBlock/what-is-the-no-large-media-switch-in-ublock-origin)

Learn about uBlock Origin's no-large-media switch. Block large media per site to save bandwidth and reduce heavyweight content globally or on specific pages.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin Uses Hostname Switches for Per-Site Configuration](/gorhill/uBlock/how-are-hostname-switches-used-for-per-site-configuration-in-ublock-origin)

Discover how uBlock Origin uses hostname switches for per-site configuration through bit-fields and hierarchical domain lookup. Customize blocking preferences effectively.

- Tags: internals
- Published: 2026-03-05

### [What Information Does the Filtering Context Contain in uBlock Origin?](/gorhill/uBlock/what-information-does-the-filtering-context-contain-in-ublock-origin)

Explore the filtering context in uBlock Origin. Discover how it holds essential metadata like URL components, resource types, and tab IDs for effective network request evaluation.

- Tags: deep-dive
- Published: 2026-03-05

### [Where Are Dynamic Filtering Rules Stored in uBlock Origin? A Deep Dive into the Source Code](/gorhill/uBlock/where-are-dynamic-filtering-rules-stored-in-ublock-origin)

Discover where uBlock Origin stores dynamic filtering rules in its source code. Learn how dynamicNetFilteringString is parsed and used by the extension.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin Dynamic Filtering Overrides Static Filter Lists](/gorhill/uBlock/how-does-ublock-origins-dynamic-filtering-override-static-filter-lists)

Learn how uBlock Origin dynamic filtering overrides static filter lists. Gain session-specific control over network requests with granular allow rules.

- Tags: deep-dive
- Published: 2026-03-05

### [Understanding the Three Levels of Blocking in uBlock Origin's Dynamic Filtering](/gorhill/uBlock/what-are-the-different-levels-of-blocking-in-ublock-origins-dynamic-filtering)

Discover uBlock Origin's three levels of blocking: master switch host bitmap rules and URL string patterns. Learn how they control network requests for enhanced privacy and security.

- Tags: deep-dive
- Published: 2026-03-05

### [How to Use Scriptlets to Block Specific Ad Initializations in uBlock Origin](/gorhill/uBlock/how-can-i-use-scriptlets-to-block-specific-ad-initializations-in-ublock-origin)

Block ad initializations early in uBlock Origin using scriptlets. Learn how these tiny JavaScript snippets neutralize ad scripts effectively through filter rules.

- Tags: how-to-guide
- Published: 2026-03-05

### [What Is the `redirect=empty` Option in uBlock Origin Filters?](/gorhill/uBlock/what-is-the-redirect-empty-option-in-ublock-origin-filters)

Learn how the redirect=empty option in uBlock Origin filters neutralizes unwanted resources with a zero-byte response, ensuring site functionality.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin Content Scripts Apply Filters: Inside the vAPI Architecture](/gorhill/uBlock/how-do-ublock-origins-content-scripts-apply-filters)

Discover how uBlock Origin content scripts apply filters using its vAPI architecture for efficient ad blocking and page cosmetic filtering.

- Tags: internals
- Published: 2026-03-05

### [What Is cosmetic-filtering.js in uBlock Origin? The Cosmetic Filtering Engine Explained](/gorhill/uBlock/what-is-the-purpose-of-cosmetic-filtering-js-in-ublock-origin)

Understand cosmetic-filtering.js, uBlock Origin's engine for parsing CSS rules and hiding unwanted elements. Learn how it efficiently manages styles for a cleaner browsing experience.

- Tags: internals
- Published: 2026-03-05

### [How uBlock Origin Compiles Static Filters into High-Performance Lookup Structures](/gorhill/uBlock/how-does-ublock-origin-compile-static-filters-into-efficient-structures)

Discover how uBlock Origin compiles millions of static filters into efficient O1 hash-map lookups. Learn about its three stage pipeline for high performance ad blocking.

- Tags: internals
- Published: 2026-03-05

### [How uBlock Origin Modifies Response Headers: A Complete Technical Guide](/gorhill/uBlock/can-ublock-origin-modify-response-headers)

Learn how uBlock Origin modifies response headers with this technical guide. Discover its powerful capabilities for filtering and altering HTTP headers before browser processing. Explore the onHeadersReceived listener and speci...

- Tags: deep-dive
- Published: 2026-03-05

### [How HTML Filters Are Implemented in uBlock Origin: A Technical Deep Dive](/gorhill/uBlock/how-are-html-filters-implemented-in-ublock-origin)

Learn how uBlock Origin implements HTML filters by compiling them into databases and applying them to the DOM via CSS selectors and JSON chains. A deep technical dive.

- Tags: deep-dive
- Published: 2026-03-05

### [How JSONPath Selectors Work in uBlock Origin Filters: A Technical Deep Dive](/gorhill/uBlock/what-is-the-role-of-jsonpath-selectors-in-ublock-origin-filters)

Learn how JSONPath selectors in uBlock Origin filters parse and match JSON data in network responses to enhance blocking capabilities beyond URLs and CSS.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin Handles Scriptlet Injection for Ad Removal: A Deep Dive into the Filtering Engine](/gorhill/uBlock/how-does-ublock-origin-handle-scriptlet-injection-for-ad-removal)

Discover how uBlock Origin uses scriptlet injection to remove ads by compiling filters into sandboxed JavaScript for pre-execution neutralization.

- Tags: deep-dive
- Published: 2026-03-05

### [How Procedural Cosmetic Filters Work in uBlock Origin: A Technical Deep Dive](/gorhill/uBlock/what-are-procedural-cosmetic-filters-in-ublock-origin)

Discover how uBlock Origin's procedural cosmetic filters use a JS engine and dynamic DOM selectors like :has() and :xpath() for advanced element hiding beyond native CSS capabilities.

- Tags: deep-dive
- Published: 2026-03-05

### [How uBlock Origin Parses Custom Filter Syntax: The AST Pipeline Explained](/gorhill/uBlock/how-does-ublock-origin-parse-custom-filter-syntax)

Discover how uBlock Origin parses custom filter syntax by diving into its AST pipeline. Learn how filter lists are converted into abstract syntax trees for efficient validation and rule compilation.

- Tags: internals
- Published: 2026-03-05

