1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 06:07:11 +02:00

Updated Per site switches (markdown)

Raymond Hill 2016-01-25 11:24:08 -05:00
parent 59e91ce16f
commit 59f33d34cf

@ -8,7 +8,7 @@ The per-site switches allows you to control uBlock's behavior on a per-site basi
- [No popups](#no-popups) - [No popups](#no-popups)
- [No strict blocking](#no-strict-blocking) - [No strict blocking](#no-strict-blocking)
- [No cosmetic filtering](#no-cosmetic-filtering) - [No large media elements](#no-large-media-elements)
- [No remote fonts](#no-remote-fonts) - [No remote fonts](#no-remote-fonts)
*** ***
@ -25,40 +25,45 @@ Blocking popups depends on whether the proper filters are present in the selecte
*** ***
#### No strict blocking #### No large media elements
The second icon is to turn off strict blocking for the current site. By default, strict blocking is enabled in uBlock (this is the opposite of Adblock Plus). The second icon is to toggle on/off the blocking of large media elements for the current site.
Adblock Plus only blocks secondary resources (see [web pages _themselves_ are **never** filtered](https://adblockplus.org/forum/viewtopic.php?t=18774#p85439)). The primary purpose of this feature is to save bandwidth. Side effect is to possibly speed up page load.
So if you were to create a filter such as `||example.com^`, and then navigate to <https://example.com>, Adblock Plus would not prevent you from connecting and loading the web page itself served at `https://example.com`, though all secondary resources pulled by that web page would be subject to filtering. By default, this setting is disabled. The global default can be enabled in the _Settings_ pane in the dashboard.
uBlock respected that semantic until version 0.9.3.0. With version 0.9.3.0, uBlock will subject web pages themselves to filtering. This means that using the same test case above, **uBlock will block the web page** served by a server found in one of the malware list (unlike Adblock Plus): ![a](https://cloud.githubusercontent.com/assets/585534/12380164/2575ee24-bd3a-11e5-8743-24da038463f8.png)
![Page was fully blocked](https://cloud.githubusercontent.com/assets/585534/8160013/14466ca0-133a-11e5-8d3c-28169288f35a.png) The threshold size -- a global setting -- to decide when to block or not is also configurable. The threshold size can be set to zero: this will cause all media elements to be blocked. For the sake of documentation, let's refer to media elements (images, videos, audios) which are larger than the set size as _"large media elements"_.
Why the change? Because [issue #1013](https://github.com/chrisaljoudi/uBlock/issues/1013) brought forth why it is desirable sometimes to completely block a web site, as opposed to what the ABP-filtering semantic dictates. You can enable/disable on a per-site basis, there is a switch in the popup panel to toggle for the current site.
In the end, the chosen solution is to now have web page themselves subject to filtering, just like all secondary resources. When large media elements have been blocked on a page, you may force a reload of these elements interactively: if you hover over the placeholder of a blocked image and the cursor changes into a magnifier, this means that clicking on a blocked image will force a reload of that image.
In the figure above, the user will be given the choice to go back by closing the window or proceed to the web page by disabling strict blocking by selecting either: If you use this feature and large media elements were blocked on a web page, the context menu will contain a new entry: _"Temporarily allow large media elements"_. When you click this entry, uBO will disable temporarily the blocking of large media element for the site, and attempt to load the blocked media elements without re-loading the page. In some cases you may need to force a reload of the page, for example if large media elements were fetched programmatically by the page. The temporary disabling will be removed for a tab as soon as you travel to a new site, or close the tab.
- Temporarily - The site will be temporarily allowed for a limited time (currently set at 60 seconds). You can set a sticky per-site rule for whether large media elements are blocked by toggling the appropriate switch in the popup panel. When large media elements are blocked on a page, the popup panel will report the number of large media elements that were blocked.
- Permanently - The site will be permanently allowed.
If the user disagrees that a web page proper should be blocked (because of a false positive for example), then they can turn off _strict blocking_ for that site: ![a](https://cloud.githubusercontent.com/assets/585534/12420615/b65f80f6-be8b-11e5-8d9c-d3cc952b87b4.png)
![Popup UI](https://raw.githubusercontent.com/gorhill/uBlock/master/doc/img/popup-1h.png)<br><sup>No strict blocking for the current site.</sup> Blocked large media elements are reported in the logger with the filter `no-large-media: [scope] true`.
This will prevent the web page proper for the site from being blocked by uBlock in the future: the filtering of the site will be done exactly as per ABP-filtering semantic, and just like with uBlock pre-0.9.3.0. Note that this feature has no privacy value: a connection to the remote server must be performed in order to fetch the size of the resource. This of course applies only to resources which were not otherwise blocked by uBO's filtering engine.
There are many benefits to strict blocking. For example, there is no good reason one should want to connect _at all_ to any of the sites present in any one of the malware domain lists. Strict blocking will prevent this from happening. Examples of usefulness (let's say you just stumbled onto these pages not knowing whether the article would really interest you), bandwidth consumed:
**Important note:** Keep in mind that when the above warning occurs, it doesn't necessarily mean the site is harmful, it just means that there is a matching filter in the selected filter lists. You decide whether the site is safe, and whether disabling strict blocking permanently for the site is appropriate. - <http://www.wired.com/2016/01/drones-arent-just-toys-anymore>
- Not blocking large media elements: 5.5 MB.
Strict blocking is commonly disabled for sites in [Badware risks](https://github.com/gorhill/uBlock/wiki/Badware-risks). - Blocking media elements larger than 1 MB: 2.1 MB.
- Blocking media elements larger than 50 kB: 1.2 MB.
**Tip:** If you wish, you may entirely disable strict blocking everywhere by adding the rule `no-strict-blocking: * true` to the _My rules_ pane in the dashboard (don't forget to click _Commit_ to make the rule stick). - <http://www.tomshardware.com/reviews/samsung-gear-vr-headset,4405.html>
- Not blocking large media elements: 15.1 MB.
- Blocking media elements larger than 1 MB: 15.1 MB.
- Blocking media elements larger than 50 kB: 61 kB.
- <https://twitter.com/> (your Twitter stream):
- Not loading largish images by default can help Twitter page performance: click on a placeholder to load only the images which seems to be of interest to you.
- This is true for any "infinite scrolling" web pages ([another example](http://www.bloomberg.com/news/articles/2016-01-19/being-illegal-won-t-keep-drones-from-taking-over-india)). Not loading the images by default help a lot in such cases.
*** ***