Recently launched a new version, need to add an app in the Navigation download portal (a picture link), and then through the normal prototyping, design, transduction, on-line process, everything is so smooth. After the line, as usual will let the product confirmation, all the adjustment and optimization are no problem, can be normal display, but found a strange phenomenon, in Chrome under the app's entrance is always invisible. Then I saw almost all the browsers (Chrome, Firefox, Safari, ie series, opera) on my machine. So I took the following steps for granted:
- Let the product clear the cache take a look, before this situation, due to the presence of a style resource cache caused by no normal display, results, no display
- The suspicion is not that the machine is not on AH (I do not want to appear this, which will lead to a series of problems on-line script), to see the product of the machine, found that other adjustments can be normal operation, should be able to eliminate the problem
Then I thought of it is not the browser plug-in has influence? Yes, when I look at the plugin, I see it, the one that makes me want to be her. When disabled, the discovery can be displayed normally. Further to follow, exactly what kind of rule triggered a normal function of my entry, as advertised to intercept. Look at the source code discovery, I used a Nav-ad class name, this is the rule that triggered the Adblock. Of course, know what causes the problem, will soon be able to solve the problem normally. But the thing is not finished, this is just a point, I think, if you do not make this rule clear, it will trigger other now unknown rules, resulting in the user can not display properly. So I learned a bit, Adblock writing rules, here with everyone to learn.
The URL address to intercept, such as: http://example.com
You can use @@ 表示 indicate that the following are exceptions, do not intercept, and can be used with the |. such as: @@|http://example.com
Use line symbol | To indicate the front end or the end. such as: Block with SwF end, swf|, block with HTTP beginning, |http.
You usually need to accept any delimiter for the rule, and the delimiter can be any character except letters, numbers, or _-.%.
Use! As a starting note, you can also write any text you want on the note.
- Using regular expressions
The filtering rules are written through regular expressions, but are not recommended for performance reasons.
Previously mentioned rules, as long as the match on the request can not be sent. Some interception must be sent before the request can know if it really needs to be intercepted, which is the rule that can be used to hide the element. When the requested data is found to trigger the blocking rule, the corresponding element is hidden. Generally use selectors for matching, such as: http://example.com## #coner-flash Http://example.com##.floatgg and so on to learn to write the rules, and then in general about the Easylist (HT Tps://easylist-downloads.adblockplus.org/easylistchina.txt) rules, and presumably know what will trigger these rules. Further, in the development process, you can avoid falling into these pits. Summing up: Through the above study can be based on easylist to see some of the often intercepted ID, class name, and then avoid the use of the class name containing the ad, classes, filenames, avoid the use of the blocked domain name resources; This can be contacted by BD to see if it can be solved. If the statistics are intercepted after the volume is large enough, it will directly affect the accuracy of the data, so this piece needs attention. Reference: Https://adblockplus.org/zh_CN/filters#basic write Adblock Plus filtering rules https://easylist-downloads.adblockplus.org/ Easylistchina.txt filter Rules http://bbs.kafan.cn/thread-1674209-1-1.html Adblock Plus Official Rules note feedback stickers
Have you ever been adblock by a hole?