Integrate ad blocking into Pale Moon

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Heartfelt

Re: Integrate ad blocking into Pale Moon

Unread post by Heartfelt » 2014-05-16, 01:43

Off-topic:
Whoops! Mis-post! My bad.

New Tobin Paradigm

Re: Integrate ad blocking into Pale Moon

Unread post by New Tobin Paradigm » 2014-05-16, 01:50

I would expect that never to happen. Blocking ads is controversial at best. It would be a bad move if Pale Moon offered this out of the box. While I agree that ad providers and webmasters need to develop better ways to implement adverts in a non-intrusive but effective way because ads can be a legit source of revenue to keep a service free.

Not to mention that it would be contrary to Pale Moon's core mission statement as I understand it as blocking ads are not something the browser should be doing out of the box it is not it's responsibility and it would add yet another layer of code complexity and something else to be maintained. The point of a browser is to get us to websites not to radically parse and mutate that content on the fly.

Would it be convenient? Yes. Would it cause a backlash that could undermine the legitimacy of Pale Moon as a true contender in the market? Yes. Would if Pale Moon saw significant market share cause the ad providers to be even more aggressive in defeating ad blockers? Yes. You could see sites in response even blacklist Pale Moon or any browser that blocks ads from even being served as a worst case.

So I am opposed to this as core feature of Pale Moon or any browser.

Transparency Disclaimer Thing: Yes I do use ad blockers!

petrus

Re: Integrate ad blocking into Pale Moon

Unread post by petrus » 2014-05-16, 02:10

Maybe do it like classic Opera, which uses a filter file (urlfilter.ini) to exclude elements and sites:

[exclude]
*&adsize=*
*&adsourceid=*
*&banner_id=*
*&bannerid=*
*://stripsaver.com/*
*.stripsaver.com/*

and so on and so forth... it actually prevents those things from loading, it doesn't just hide them!

It's sort of an internal hosts file for the browser.

While it did contribute to a slower startup time, there were no slowdowns or lag because of it further on.

If i try to visit a blocked page, I'm instantly, in a millisecond redirected to...
"Web Address Blocked The address is blocked by the content blocker."
Last edited by petrus on 2014-05-16, 02:31, edited 1 time in total.

buggy

Re: Integrate ad blocking into Pale Moon

Unread post by buggy » 2014-05-16, 02:21

If you use appropriate filters most of ads elements are blocked, anyway for others more specific you can't avoid to use Element Hiding Helper or Yarip. Urlfilter.ini ok, but with an adblocker the lists are updated automatically, better i think.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Integrate ad blocking into Pale Moon

Unread post by Moonchild » 2014-05-16, 07:18

Part of Pale Moon's core mission is to provide an as neutral and unbiased browser as possible. Providing people with integrated ad-blocking would go directly against that, because I'd have to make decisions on a per-provider and per-site basis what to display and what to block. That would be creating (strong) bias in the browser itself, and it would impact all sites visited, large and especially small.
Don't underestimate the legitimate income for small site owners. Do I want to support undermining those sites? No.

So, I won't be putting an ad-blocker in Pale Moon's core, and instead let every user decide for themselves if, what and how to block on sites they visit.

As an aside to the OP: Compiled JS code is about as fast as c/c++ code these days. There's no large difference. Large parts of the browser front-end are written in JS and variants. So, there wouldn't be much of a net win there. I do agree that injecting large style sheets isn't necessarily the best approach, but it's not terrible either. In addition, blocked graphics and code do, in fact, not get downloaded, so the style sheets are there as far as I know just to collapse the elements (and you can therefore possibly improve performance or memory footprint by setting it not to collapse and just to block? You'd have to investigate or ask the ABP developers).

And yes, I do use an ad blocker myself, with very lenient settings (on my desktop), because mostly I just got tired of websites being hung up on slow ad servers, and to weed out particularly malicious ad servers (that I'd otherwise have to do through some out-of-browser solution like the often problem-wrought AV "web filters"). On the Netbook it's important for bandwidth since I often use the thing in capped environments like airports, stations and other hotspot locations or 3G-connected. But that is still my personal choice and I wouldn't want to impose that choice on every user.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

opera1215b1748

Re: Integrate ad blocking into Pale Moon

Unread post by opera1215b1748 » 2014-05-16, 11:23

Heartfelt wrote:
Off-topic:
nctritech wrote:Pale Moon should lead the way and be the first browser with built-in high-speed ad blocking capability built into the browser.
It wouldn't be the first. Konqueror had it built-in years ago.
And most definitely - Opera pioneered it.

opera1215b1748

Re: Integrate ad blocking into Pale Moon

Unread post by opera1215b1748 » 2014-05-16, 11:40

Moonchild wrote:...I'd have to make decisions on a per-provider and per-site basis what to display and what to block...
You should not decide anything (there should not be any hardcoded/pre-configured lists).

When I right-click on a page - a context menu appears with the Block content... entry in it.
Then I can see all off-site objects, I can add them to the ignored list one by one. That's all. No extra traffic to fetch things not to be shown.
No bias either - it is solely user's choice and will to see/ignore something.

I guess you will reject it, I'm just telling how it iswas done properly elsewhere...
:(

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Integrate ad blocking into Pale Moon

Unread post by Moonchild » 2014-05-16, 12:42

So, in what way would that be different than deciding that yes, you want to start blocking ads, so you pick and choose which way (= which extension) allows you to do this most comfortably?
Having users go from scratch and manually having to add what content to block (from the many hundreds/thousands of different external sources) is a very naive way to go about it. Also, individually blocking sources will not consistently block anything - and I don't think the average users knows their way around regex ;)
More overhead if people want to support certain sites but not others, and more work for the user. I don't think that's "doing it properly". And I think "the Opera way" is one of many different ways to go about it, so would be best done in an extension and not in the core.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5174
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Integrate ad blocking into Pale Moon

Unread post by Night Wing » 2014-05-16, 13:13

Speaking just for myself, I wouldn't want to see ad-blocking being incorporated into Pale Moon. And I don't use any ad-blocking extensions in either Pale Moon or Firefox.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

opera1215b1748

Re: Integrate ad blocking into Pale Moon

Unread post by opera1215b1748 » 2014-05-16, 14:41

Moonchild wrote:...average users knows their way around regex....
Why?
What regex?!

Right now, if I'm annoyed by a particular banner on a particular site - I just right-click, mark it to be ignored, click "Done" - voilà!, no more of anointments here.
Off-topic:
In my hatred against add-ons I'd rather edit the hosts file manually many times a day than use one!

Heartfelt

Re: Integrate ad blocking into Pale Moon

Unread post by Heartfelt » 2014-05-16, 15:23

Moonchild wrote:you want to start blocking ads, so you pick and choose which way (= which extension) allows you to do this most comfortably?
Night Wing wrote:I wouldn't want to see ad-blocking being incorporated into Pale Moon.
I agree here. I'm a big fan of the extension model. In this way, a user is able to choose the functionality that works best for his or her workflow. The browser is free from unwanted bloat and there are varying methods and options to choose between. You aren't stuck with the vision that one developer had. You are able to choose your own best configuration. I would argue that ad-blocking isn't core browser functionality. We already see that there are users on the board who don't make use of it.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Integrate ad blocking into Pale Moon

Unread post by Moonchild » 2014-05-16, 15:31

Well, bottom line is: Pale Moon is there to enable the download and display of web page content, not disable it.

My point about regex being: unless you want the list to grow to a silly size to be checked against for every single connection made (slowing the browser down more and more and more as time passes and more is blocked), you're going to have to use regex.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

dark_moon

Re: Integrate ad blocking into Pale Moon

Unread post by dark_moon » 2014-05-16, 15:57

Maybe combine this thread with this one http://forum.palemoon.org/viewtopic.php?f=3&t=4149

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Integrate ad blocking into Pale Moon

Unread post by Moonchild » 2014-05-16, 16:01

dark_moon wrote:Maybe combine this thread with this one http://forum.palemoon.org/viewtopic.php?f=3&t=4149
Not really, since they are about two different things - integrating an ad-blocking feature in the core versus which ad blocker to choose in the other thread. Although it's a good thing to look at the other thread as well :)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

mgagnonlv
Lunatic
Lunatic
Posts: 266
Joined: 2013-03-05, 02:06
Location: Canada

Re: Integrate ad blocking into Pale Moon

Unread post by mgagnonlv » 2014-05-16, 17:20

Agreed. The topic referred to by Dark_moon is one good reason why ad-blocking should be left to an extension. Besides, AdBlock Plus and AdBlock Edge work fairly well and they are the ones who integrate lists, update them, make sure they work, etc. I prefer that Moonchild continues to work on making the best browser...

If there is something I get from the recent article about memory consumption by Adblocker, it is that there might be some code optimization that needs to be done either on AdBlock Plus's side or on Firefox (and Pale Moon) side. But then, is it possible that the author of the article has some vested interest in a web full of ads? How many "scientific studies" do we see that state that "coffee is good" (subsidized by coffee growers), that wine is good (subsidized by some wine industries), etc. With the improper state of mind, it is easy to blow up a real but minor issue.
Michel Gagnon
Montréal (Québec, Canada)

nctritech

Re: Integrate ad blocking into Pale Moon

Unread post by nctritech » 2014-05-18, 13:18

I am happy to have brought about a discussion on this subject, and Moonchild, I appreciate where you are coming from on this. Thanks to everyone for entertaining my suggestion. I appreciate it!

pmjack
Moongazer
Moongazer
Posts: 14
Joined: 2014-05-23, 00:37
Location: US

Re: Integrate ad blocking into Pale Moon

Unread post by pmjack » 2014-05-23, 01:14

I'm still in favor of a built-in ads blocker, but only if it's disabled by default.

Let me make my case. Believe it or not IE, of all browsers, ships with a built-in ads blocker since IE8! Any IE user can go to Microsoft's http://www.iegallery.com/en-us/trackingprotectionlists and subscribe to several manged lists there including Easylist and EasyPrivacy. Albeit, it's rather basic and doesn't block connections made from plugins like Flash. So youtube flash videos still show ads.

However, a killer feature unique to IE is its additional heuristic blocking function. Any IE user can turn on "Personalized Tracking Protection List" and IE will automatically block external connections after an adjustable re-occurrence rate. This idea is rather clever and protect its users even if they don't subscribe to any ad blocking list.

If IE (which still has the largest browser market shares combined from IE8 to IE11 btw) ships with a built-in ads blocker with no repercussion from anyone because it's disabled by dfault, why not Palemoon?

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Integrate ad blocking into Pale Moon

Unread post by Moonchild » 2014-05-23, 14:32

pmjack wrote:If IE (which still has the largest browser market shares combined from IE8 to IE11 btw) ships with a built-in ads blocker with no repercussion from anyone because it's disabled by dfault, why not Palemoon?
Because Pale Moon already has the option (by way of extensions, something that IE doesn't have and therefore is forced to include everything in the browser itself that users might possibly need). From a user point of view, enabling ad blocking in a browser core or in an extension is the same amount of work. From a browser point of view, adding code that's going to be disabled by default is wasteful. Another point: Because of the "free market" of extensions, people have also been able to switch extension (e.g. some don't like ABP anymore and have moved to ABE - others prefer blocking with NoScript or BluHell, or similar) when they felt the desire.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

dark_moon

Re: Integrate ad blocking into Pale Moon

Unread post by dark_moon » 2014-05-23, 18:47

And including an adblocker can have make more problems.
For example if a website check which browser use the user. Maybe the website block then content for this browser, because they now all user of this browser didn't bring them money.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Integrate ad blocking into Pale Moon

Unread post by Moonchild » 2014-05-23, 20:27

dark_moon wrote:And including an adblocker can have make more problems.
For example if a website check which browser use the user. Maybe the website block then content for this browser, because they now all user of this browser didn't bring them money.
Actually, good point as well. sites may start boycotting Pale Moon for undermining their business.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite