mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Created Tricks and tips (markdown)
parent
23fc3ce9f0
commit
94e0066f99
1 changed files with 8 additions and 0 deletions
8
Tricks-and-tips.md
Normal file
8
Tricks-and-tips.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#### Easy way to find out what other blockers do not block what they should block
|
||||
|
||||
Since version 0.2.0.0, when the popup blocker code was added, µBlock decides whether a request should be cancelled during `chrome.webRequest.onBeforeSendHeaders`. Before 0.2.0.0, the evaluation of filters was done earlier in the pipeline, during `chrome.webRequest.onBeforeRequest`. This was required because the popup blocker code needs the HTTP referrer header to do its job.
|
||||
|
||||
Net requests can be cancelled as effectively using `chrome.webRequest.onBeforeSendHeaders`, so it's not an issue. There is a side effect though, which can actually be quite useful: you can find out what another blocker does not block. Other blockers typically cancel requests during `chrome.webRequest.onBeforeRequest`, which means by the time µBlock's handler at `chrome.webRequest.onBeforeSendHeaders` time kicks in, many, if not all, net requests have been blocked by the other blocker(s).
|
||||
|
||||
So in such case, if you notice µBlock actually blocks something, it's actually everything the other blocker(s) did **not** block. Thus, µBlock can also be used to find out what other blockers are missing.
|
||||
|
||||
Loading…
Reference in a new issue