Have you ever asked yourself what ad-blocking scripts and extensions like uBlock Origin do after they have been installed?
While it is clear that they block or allow network requests or DOM elements, it is usually not that simple to find out about all activity in detail.
This gives interested users an option to control what the extension is doing when enabled in the browser they are using.
There are several applications for this: check what is being blocked to make sure that no critical page elements are included, control that custom rules are working properly, or diagnose why some elements are not covered by existing rules.
A click on the uBlock Origin button in the interface of the browser that you are using opens a small menu that allows you to control the state of the extension as well as specific features. The Logger icon is displayed next to the "element picker" icon in the middle of the interface.
Note: The logger only logs activity if it is open. This is done to keep the extension efficient and avoid cpu and memory usage.
A new page is opened afterwards that displays all activity in chronological order. Each entry is listed with a timestamp, its type (e.g. popup, script or dom), the page the manipulation was carried out on, DOM elements if the type is DOM, and rules that blocked scripts from being loaded.
If you are interested in a particular web page you may use the filter at the top to display only its activity. There you find listed all open tabs in the browser sorted alphabetically. Instead of doing that, you may also use the search filter to find specific activities, for instance specific rules.
A click on a log entry displays information about the filter and the list it is found in. While you can simply type and get results, you may use filter expressions to customize the output. For instance, to find entries that match what you type exactly, use |example| and replace example with the search term.
Another interesting feature provided by the Logger is quick access to uBlock's advanced filtering options. You do need to enable the "advanced user" option in the program options first though before this becomes available.
A click on the second column in the logger opens the interface for the listed page/domain.
Another useful feature is called "Behind the scene". You find it listed in the page selection menu, and it lists requests that uBlock cannot associate with a domain.
This includes among other things requests made by the browser itself, made by extensions, and by websites if technologies such as hyperlink auditing are used.
You may create dynamic URL filtering rules or static network filters from the Logger interface. These let you create temporary or permanent filters, and are useful in finding out which network requests need to be blocked or allowed on a page.
The log capabilities of uBlock Origin are quite powerful. While it may not be of interest to the majority of users who use the extension in Firefox or Chrome, it provides advanced users with options to monitor, control and fine-tune the browser extension.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.