[howto] alternative adblock in the native Sailfish Browser
As of 2.0.4.13 release we've got a better browser.
Unfortunately it is not compatible anymore with Adblock extension.
see 28922
Alternatives such as using a custom hosts files or custom DNS resolver may work (see 145811) but only allow filtering on hostname part of URL which leads to partial ad blocking.
I suggest using a smart proxy PAC file in browser to direct known ads URL to blackhole server. I will use Speedmeup which is free, fast and privacy concerned.
DISCLAIMER : i'm involved in Speedmeup project, so my opinion may be biased. There are several others PAC providers. Feel free to use the one you prefer, technical steps are the same.
BEFORE YOU ASK : there is NO proxy is this setup, never, we just trick the PAC file system. see FAQ. Your browsing network traffic remains direct.
Step 1
Launch browser, open new tab, go to "about:config"
Promise to not change anything you don't understand by hitting "OK"
Step 2
Enter "proxy" in the search bar, hit enter
Step 3
Find the key "network.proxy.autoconfig_url"
Change its value from empty (default) to "http://jolla.speedmeup.net/"
This is the URL of the PAC file, you can browse to it to see this wonderful JS script.
Step 4
Find the key "network.proxy.type"
Change its value from 5 (default) to 2
2 means "use the auto-configuration URL"
Step 5
Test your setup by hitting the page http://www.speedmeup.net/diag which should confirm your setup is working.
Enjoy !
Revert back
To disable this setup, just proceed in reverse order.
Revert the network.proxy.type key to 5 and empty the "network.proxy.autoconfig_url" key
Confirm it is disabled by using the "diag" URL
Interesting way but does this also affect in-app advertisements? Can a system wide proxy be configured in a similar way?
PatsJolla ( 2016-10-12 12:33:13 +0200 )editI use this: http://winhelp2002.mvps.org/hosts.htm and https://openrepos.net/content/bloodyfoxy/noadshosts (Jolla and laptop) I'm happy with it, as it's stealthy. Websites can't retaliate.
objectifnul ( 2016-10-12 12:51:32 +0200 )edit@PatsJolla unfortunately setting a system wide auto-configuration URL does not work. despite being shown in Sailfish "Wifi settings", this URL doesn't affect any component
pedro ( 2016-10-12 12:57:05 +0200 )editsee 22824
On my Nokia N810 I used to use Privoxy with the MicroB browser. Is Privoxy available for Jolla? It can do other things as well as blocking ads, like changing http headers.
DaveRo ( 2016-10-12 13:35:22 +0200 )editnoadshosts is working systemwide.
objectifnul ( 2016-10-12 14:13:42 +0200 )edit