Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ugultopu/d6c58eb86d3e902ce6eb4afb944c5874 to your computer and use it in GitHub Desktop.
Save ugultopu/d6c58eb86d3e902ce6eb4afb944c5874 to your computer and use it in GitHub Desktop.

For example, you wanted to block an image using Adblock Plus filter syntax:

expressjs.com/images/bg.jpg

After adding this rule, if you go to Express.js website and refresh the page (that is, assuming that you already loaded a page from Express.js website before adding the Adblock Plus rule), you will observe that the rule did not work. The reason is, the image was cached and it is simply being served from the cache. Hence, it seems like the rule is not working.

To observe that the rule is indeed working, you can open a private browser window (for example by pressing CMDSHIFTN) and loading the page there. Then, you should observe that the filter indeed works.

To get the filter working on non-private windows as well, simply clear the cache for the domain by:

  • Opening developer tools.
  • Navigating to the "Network" tab.
  • Making sure that "Disable cache" option is selected.
  • Refreshing the web page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment