How to detect the URLs loading in the background and reload the page?

How I can detect URLs loading in the background of a webpage and reload the page in case the page contains the URL.

Example:

Lets say I am opening msn.com and there are two files or the images being loaded from 192.168.1.1 and example.com. As soon as these two URLs get detected I want to reload the page.

I tried
var pageMod = require(“sdk/page-mod”);
pageMod.PageMod({
include: [".maxcdn.com",".googleapis.com",“192.168.1.1”],
contentScript: ‘window.alert(“This website is using CDN/localhost”);’
});