If the issue happens from a controlled network, then I suggest implementing ad-blocking at the network level.
There are lots of free, maintained, lists that can be incorporated into a blocklist. If you are using something like a Ubiquiti EdgeRouter Lite, someone has created an auto-updating anti-advert, anti-malware block script that is excellent I expect something like this may be available on other routers too.
Use of OpenDNS may also help as it will block known bad sites. You can do that both at the network level and at the PC level.
There are, of course, many other tools that will either block known bad sites or will block all adverts.