This is the fourth day of my participation in Gwen Challenge

Due to the improvement of daily activity of the website, the website recently launched the advertising promotion column page function for realization, but received feedback from individual users:

The AD promotion column on the front page of the website is blank when it should show the AD picture

Troubleshoot problems

Server Check

Interface screen

Postman and curl can be used to simulate network requests and obtain data normally

Client Troubleshooting

Check clients when the server is normal.

  1. Open developer tools in Chrome F12, select Network, Preserve Log and Disable Cache, and select All to refresh the page

  1. The Status of some requests was found to be abnormal. The HTTP request Status was blocked:other, which basically confirmed that the browser blocked HTTP requests and these requests were the interface to obtain the advertisement column image

The reason why the browser blocks the request

  1. The HTTP request Status was blocked:other
  2. The user has AdBlock in his browser plug-in
  3. These urls all contain advert keywords

Conclusions can be drawn from the above points:

  1. Since the API interface path contains sensitive keywords for advert,
  2. Triggering AdBlock, the browser plugin that blocks ads,
  3. Directly intercepts and terminates HTTP requests,
  4. Failed to load image data.
  5. The final advertising column is left blank.

The solution

Do not use keywords related to advertising such as AD, advert, and advertisement in interface routes. Because these characters easily trigger the AD blocking mechanism of the client browser plug-in;

Problem Solving Ideas

The development and design is suitable for top-down, but the troubleshooting of problems should be conducted from the bottom interface first, from bottom to top, gradually eliminating each link, and then confirming the problem link.