There are ways to intercept browser resource loading by using Browser Extensions (specially Google Chrome). here is the sample code:
chrome.webRequest.onBeforeReq