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.
- Open developer tools in Chrome F12, select Network, Preserve Log and Disable Cache, and select All to refresh the page
- 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
- The HTTP request Status was blocked:other
- The user has AdBlock in his browser plug-in
- These urls all contain advert keywords
Conclusions can be drawn from the above points:
- Since the API interface path contains sensitive keywords for advert,
- Triggering AdBlock, the browser plugin that blocks ads,
- Directly intercepts and terminates HTTP requests,
- Failed to load image data.
- 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.