gorhill / httpswitchboard

Point & click to forbid/allow any class of requests made by your browser. Use it to block scripts, iframes, ads, facebook, etc.
GNU General Public License v3.0
1.33k stars 83 forks source link

user adblock-compatible block rules not working propertly #395

Closed deathtrip closed 9 years ago

deathtrip commented 9 years ago

for example: adding avatar to the list will block somesite.com/avatar/picture.jpg but not block somesite.com/avatars/picture.jpg, it should block both

gorhill commented 9 years ago

First I will ask: You have a test case?

Then I will respond according to your answer.

Edit: note that I couldn't find such instance of filters in EasyList, EasyPrivacy, Fanboy's, or any other lists I opened for a quick check. There is a very good reason for this: supporting that kind of filters just can't be done efficiently, it means that all such filter instances would have to be tested for each URL, unconditionally. So even though ABP filters doc doesn't forbid that kind of syntax, the cost in term of CPU is prohibitive (and clearly ABP agrees since I can't find any instance of such filters). The trade-off is that a user would have to enter two filters instead of one, avatar and avatars, rather small "inconvenience" considering the consequence of supporting these completely inefficient filters.