µBlock, a lean and fast blocker

Discussion in 'other software & services' started by gorhill, Jun 23, 2014.

  1. Excellent tool. I'm a avid user of uBlock Origon and I installed it on 300 work computers because it's that good.

    Infection rate since I installed uBlock Origin has gone down 30%. I'm very happy :)
     
  2. Overkill

    Overkill Registered Member

    Joined:
    Mar 16, 2012
    Posts:
    2,343
    Location:
    USA
    What settings do you use?
     
  3. harsha_mic

    harsha_mic Registered Member

    Joined:
    Mar 11, 2009
    Posts:
    815
    Location:
    India
    For Chromium users, there is now a companion extension (Github link, Chrome Store) to uBlock Origin, which enables uBlock Origin to be aware of web-socket connections, and they will undergo all the filtering as the normal requests.

    Note: This is not needed for Firefox based browsers, because in Chrome, these web-socket connections are not exposed in WebRequest API, hence the chrome based browser extensions are blind to these type of connections. Thanks to gorhill, uBlock Origin for Chrome is equal to Firefox in this regard.
     
    Last edited: May 5, 2016
  4. NSG001

    NSG001 Registered Member

    Joined:
    Jul 14, 2006
    Posts:
    682
    Location:
    Wembley, London
    @harsha_mic
    Thanks kindly for this info, very useful :thumb:
     
  5. harsha_mic

    harsha_mic Registered Member

    Joined:
    Mar 11, 2009
    Posts:
    815
    Location:
    India
  6. Ocky

    Ocky Registered Member

    Joined:
    May 6, 2006
    Posts:
    2,713
    Location:
    George, S.Africa
    Installed Opera 37 on CentOS 7.2 with extensions uBlock₀ and uMatrix. In settings I see something that I thought was uBlock₀ territory, but uMatrix appears. See screenshot ..
     

    Attached Files:

  7. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    Call me dumb, but can anyone explain how to block first party scripts? This is easily done with NoScript, but I can't figure it out with uBlock.
     
  8. yeL

    yeL Registered Member

    Joined:
    Aug 10, 2015
    Posts:
    293
    Go to uBlock settings, tick the "I am an advanced user" box and then you will be presented with many other options under uBlock icon.
     
  9. Overkill

    Overkill Registered Member

    Joined:
    Mar 16, 2012
    Posts:
    2,343
    Location:
    USA
    In the image below I have 1st party scripts blocked globally... now for the current site your on, you would use the other column to the right and click the red cell.

    EDIT: After you've done this...

     

    Attached Files:

  10. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    When I do that, it will break sites, while NS doesn't. For example, it will break: http://www.dailymail.co.uk/news/index.html

    Yes correct, but I couldn't figure out how to do it, the interface of NS is much simpler.
     

    Attached Files:

    • DM.png
      DM.png
      File size:
      24.8 KB
      Views:
      17
  11. Overkill

    Overkill Registered Member

    Joined:
    Mar 16, 2012
    Posts:
    2,343
    Location:
    USA
  12. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,069
    Location:
    Canada
    You aren't blocking anything globally, only dailymail.co.uk. If you want to block specific content globally by default, you select the red fill in the left-hand column of, for example, either 1st-party scripts, 3rd-party scripts, or 3rd-party frames. Anything in the right-hand column applies only locally.

    There is a nice explanation of it with illustrations here.

    EDIT

    That block rule you applied to dailymail.co.uk blocks everything on that top level domain, which is why it breaks the page.
     
    Last edited: May 15, 2016
  13. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    Yes that's my goal, I want to block stuff per site, not globally. And with FF the site layout doesn't break. With uBlock it also doesn't break when I block it globally, but it does when I do it only for Daily Mail. This is not the case with NS, see screenshot.

    That's weird, did you use the exact same settings? And I also wonder if Gorhill can perhaps make a bit simpler version, similar to NS and ScriptKeeper. Also, how to autorefresh after blocking or unblocking stuff?

    https://addons.opera.com/nl/extensions/details/scriptkeeper/?display=en
     

    Attached Files:

    • FF.png
      FF.png
      File size:
      43 KB
      Views:
      12
  14. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,069
    Location:
    Canada
    It seems you will make more work for yourself blocking on a per-site basis, but it is possible.

    All you need to do is select "red" in the third column for the content "type" (1st-party scripts, 3rd-party scripts/frames, etc...) you want to block for a particular site. If you select "Red" in the second column, it will block globally. The way you selected it for dailymail.co.uk causes it to block all content types, and that's why the site broke.

    Please see attached screen grab. Notice where I selected "Red" in the third column for 1st-party scripts. This will block 1st-party scripts only for dailymail.co.uk. If I had selected "Red" in the second column, it will block 1st-party scripts Globally, iow all sites.
     

    Attached Files:

  15. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    OK, I see. Like I said perhaps I'm a bit slow, I totally forgot to check the second column. It now does seem to work. And I only disable first party scripts on sites that are too bloated. Blocking it on all sites would break most sites.
     
  16. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,069
    Location:
    Canada
    No worries and hopefully you see the logic in the matrix. It really does make sense once you see it. it took me some time plus an explanation from gorhill before I got it.

    Also, just to re-hash, in your post #1960 where you selected "Red" in the second column specifically for globalmail.co.uk, because you are not specifying a content type to block, uBlock assumes you want to block all content types, thus the reason it breaks the site. In my example, I chose specifically to block only 1st-party scripts for dailymail.co.uk.

    So...

    -1st column are the sites
    - 2nd column is Global
    - 3rd column is site-specific
     
  17. Overkill

    Overkill Registered Member

    Joined:
    Mar 16, 2012
    Posts:
    2,343
    Location:
    USA
    I tried globally and just for dailymail and neither broke the site... i'm using default settings
     
  18. pasmal

    pasmal Registered Member

    Joined:
    Jan 25, 2015
    Posts:
    55
    So Opera 37 shipped with a native adblocker that claims to be faster than uBlock Origin:

    http://www-static-blogs.operacdn.com/multi/wp-content/uploads/sites/3/2016/03/adblock-infographic-i3.png

    Source

    Interestingly enough, Opera's benchmarks has the now-dormant uBlock being faster than Origin slightly by 0.1 seconds. I think this is due to Origin doing more checks against different items, but Origin has more features, so that's a small price to pay.

    Opera's 1-second advantage over Origin though is a little impressive, however I wonder if Opera's native blocker blocks less though.
     
  19. Brummelchen

    Brummelchen Registered Member

    Joined:
    Jan 3, 2009
    Posts:
    5,940
    annoying stuff, i turned it off and still use uBo
     
  20. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    Thanks for the info, but what about autorefresh?
     
  21. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,069
    Location:
    Canada
    It doesn't do that. I can't remember the reason why gorhill doesn't include that, but from my pov it doesn't bother me at all just to click to refresh after modifying Dynamic filtering settings. I used to use https everywhere extension and it auto-refreshes after every change which I found annoying.
     
  22. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    It should be optional, it doesn't make any sense having to manually refresh, if you ask me. And I still think there should be a more simpler GUI for folks who don't need all bells and whistles. The only thing I do is disabling first party scripts, with ScriptKeeper and NS this is done easily without having to think twice.
     
  23. harsha_mic

    harsha_mic Registered Member

    Joined:
    Mar 11, 2009
    Posts:
    815
    Location:
    India
    I think i agree with you. However i see it is more sense to have it manually refreshed, since one might have to change more than one setting, in this case it causes unnecessary reloads.
    The default is simpler. I can't think of more simpler one. Everything is hidden in default mode. Which is what all the users see when they install.
     
  24. wat0114

    wat0114 Registered Member

    Joined:
    Aug 5, 2012
    Posts:
    4,069
    Location:
    Canada
    It's so easy with uBlockO as well. The Dynamic filtering: quick guide in the link I posted earlier explains it all perfectly.

    I don't understand why you want to block 1st-party scripts as opposed to the more troublesome 3rd-party scripts and frames?? You might want to check out the Blocking mode Wiki page for some ideas on this.
     
  25. Rasheed187

    Rasheed187 Registered Member

    Joined:
    Jul 10, 2004
    Posts:
    17,559
    Location:
    The Netherlands
    Yes, once you get a hold of it it's easy, but the GUI is still too cluttered for people who don't use all options. And like I said, I almost never disable first party scripts, I do it only on sites that are slow even with third party trackers being blocked, and of course I do it only if the site layout won't break. For example Arch Daily used to be a user-friendly site, it still looks good, but it has become bloated, on my system it loads a bit choppy. But disabling first party scripts will break the site.

    http://www.archdaily.com/
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.