Answer the question
In order to leave comments, you need to log in
How is address filtering implemented in ad blockers?
To improve my skills, I decided to write my own ad blocker. On the Internet, I found a list of addresses of the form:
site1.ru
*.site2.ru
*.ru/ads/ and so on.
Let's say I get an address like site.ru or thissite.site.ru or site.ru/ad/ or even thissite.site.ru/ad/.
How can I check if this site is eligible for the list? If each time to check by enumeration, then it will take a lot of time (there are about 15,000 lines in the list). There was an idea to check using an associative array, but this will only work if there is a complete match.
Answer the question
In order to leave comments, you need to log in
In your case, this is
For general development in regular seasons, study: https://www.youtube.com/watch?v=0rwYISzL-c8&list=P...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question