Filtering methods for Chrome, Firefox, and Opera advertisements on Android

Source: Internet
Author: User
Tags user agent switcher

Due to the limited size of the mobile phone screen, the content displayed on the mobile phone version of the website is usually more concise, of course, it also reduces or removes advertisements. However, after all, there are still many websites that do not have a special mobile phone version, or text ads for the mobile phone version also occupy a lot of space. After Opera and Google cooperate, Opera mini no longer filters Google search ads. Google Chrome, Firefox, and Opera have their own ad filtering functions.

General Method

  • Not Root: Adblock Plus for Android;
  • Root: hosts and all tools that can change hosts, such as AdAway ).

Adblock Plus for Android comes from the well-known adblockplus.org. Supports blocking Wifi advertisements by Root in a non-Root environment and filtering by 3G environment). Currently, only rules can be subscribed and cannot be customized. The biggest drawback is that it needs to reside in the background and the memory usage is not small.
After Root, you can edit the rule file:

/Data/org. adblockplus. android/files/patterns. ini

Question: Adblock Plus had vowed not to develop Chrome. Now it not only has Adblock plus for Chrome, but also Opera and K-Meleon.

Hosts is a versatile algorithm with the same advantages and disadvantages as those on PC. Hosts can only act on the website domain name, and the IP address of the domain name to be intercepted is limited to 127.0.0.0 or 0.0.0.0. Unfortunately, it cannot be refined.

Default hosts file location for Android:

/Etc/hosts

Chrome for Android (root)

The desktop version of Chrome supports global css, and Chrome for Android inherits this feature. Global css with obvious limitations. However, hiding part of the content can save a lot of space for cell phone screens.

Custom.css position:

/Data/com. android. chrome/app_chrome/Default/User StyleSheets/Custom.css

Position of pcm.m.css:

\ User Data \ Default \ User StyleSheets \ Custom.css

Firefox for Android

Like the desktop version, ABP almost quickly becomes the standard for Firefox. The Adblock Plus extension does not support customization.
You can also edit the rule file after Root:

/Data/org. mozilla. firefox/files/mozilla/xxxxxxx. dafault/adblockplus/patterns. ini

Of course there are other extensions that support filtering. NoScript and Stylish also support mobile versions.

Opera Mobile (oupeng HD)

Opera mobilecan see the Opera of the PC terminal, and the advertisement filter also inherits the urlfilter.iniand custom.css global). The setting method is as follows:

  • Opera: config-network-url filter file, select urlfilter. ini file location-save;
  • Opera: config-user prefs-local css file, select custom.css file location-save.

There are also many Filtering Rule subscription sources on the network, such as Opera Mobile Ad filtering list subscription sources.

PC browser disguising mobile Internet access

As mentioned in the beginning, many websites have PC and mobile versions. The codes of the two versions are different. In addition, some websites have different CSS codes in different browsers. For example, Google has obvious differences in Chrome and Opera Mobile. Therefore, it is better to customize the filtering rules based on your browser habits.

Writing filtering rules on the PC side is also simple, but there is only one more step for the browser to disguise the mobile Internet access.

Taking Firefox as an example, you can use the User Agent Switcher extension, or create a "general. useragent. override" string to change the browser's UserAgent. For details, refer to Firefox manual change of UserAgent, disguised as a mobile phone or other browsers.

Common Browser User Agent String can be viewed: http://www.useragentstring.com/pages/useragentstring.php

Google official also shows Chrome for Android User-Agent: https://developers.google.com/chrome/mobile/docs/user-agent

The method for writing ad filtering rules is not described here. Browsers using cloud compression such as Opera mini and UC are not discussed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.