[webkit-help] Content Blocking

Brent Montrose brent.montrose at gmail.com
Mon Jun 22 10:11:55 PDT 2015


Hello

I have another question regarding Content Blocking, and performance.

For the "Action" types of "css-display-none" are the following two
examples effectively the same (hiding content on example.com)?

Example 1:

"trigger": {
"url-filter": "^https?://([^/]*\.)?example\.com"
},
"action": {
"type": "css-display-none",
"selector": ".ad"
}

Example 2:
"trigger": {
"url-filter": "^https?://",
"if-domain": "example.com"
},
"action": {
"type": "css-display-none",
"selector": ".ad"
}

Example 1 explicitly specifies the domain in the "url-filter".
Example 2 uses a very generic "url-filter", but utilizes the
"if-domain" restrict which domains the selector would be applied to.

Are these two rules effectively the same?  (I think they are based on
my understanding).  Also, is there a performance difference between
the two?  If so, which one would perform better, and why?

Thanks for your assistance.

-- Brent


More information about the webkit-help mailing list