How can we detect it inside the browser ?

Detect, or block? There are a few options for blocking, if you run uBlock Origin[1] the Resource Abuse list covers many.

1: https://github.com/gorhill/uBlock