This is AdBlock's old support site. It is available for archival purposes only. To create a new discussion, or to visit the up-to-date knowledge base, please visit help.getadblock.com

Nothing blocked when page is local?

Moo's Avatar

Moo

16 Nov, 2014 02:37 AM

When using a local (file://) page, it seems nothing accessed by the page is blocked at all. The icon remains grey. Is this by design?

  1. 1 Posted by Kieran on 16 Nov, 2014 08:57 AM

    Kieran's Avatar

    Thanks for reporting this!

    I've just asked one of our developers about this, but if this isn't expected behaviour, then thanks for reporting the bug!

    Our code is open-source at http://code.getadblock.com and if you have knowledge of HTML, CSS and JavaScript, then we'd love to see a patch sent as an attachment!

  2. 2 Posted by Moo on 16 Nov, 2014 04:12 PM

    Moo's Avatar

    Ah... I had a look and found this...

      // Returns true if the url cannot be blocked
      page_is_unblockable = function(url) {
        if (!url) { // Safari empty/bookmarks/top sites page
          return true;
        } else {
          var scheme = parseUri(url).protocol;
          return (scheme !== 'http:' && scheme !== 'https:' && scheme !== 'feed:');
        }
      }
    

    I think this controls whether things from a page are blocked, and certainly controls the icon etc. So, file: wouldn't be blocked... I can't see any reason why it shouldn't be, though, so maybe it should just be added to that function...

    But I'm also wondering why the "source page" matters at all. If something is in a list to be blocked, shouldn't it be blocked whenever an attempt is made to access it, wherever that attempt came from? Unless the source was whitelisted or whatever, but that still doesn't rely on protocol... Really, what other protocols are there, which you don't want blocked?

  3. Support Staff 3 Posted by Brent on 17 Nov, 2014 03:49 PM

    Brent's Avatar

    Yes, you are correct. Only typically HTTP / HTTPS traffic is blocked by AdBlock, and yes this is by design.

    Resources loaded from the local file system using the 'file:///' URL scheme are not blocked because they are local, the owner of the resource can control via other means which content is loaded or not. Also, AdBlock is seen as way to save bandwidth, and loading resources from a local URL wouldn't save any bandwidth.

  4. 4 Posted by Moo on 17 Nov, 2014 07:06 PM

    Moo's Avatar

    I'm not talking about blocking URLs that are on the local filesystem... It's that resources on normal (http) URLs aren't blocked either, when the "main page" isn't on http/https/feed.

  5. Neelfyn closed this discussion on 24 Dec, 2014 11:13 PM.

Discussions are closed to public comments.
If you need help with AdBlock please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac