When this file is to be loaded I’m instead returning “redirectUrl: moz-extension://1bfb861f-d973-4e7c-ab11-dc98b45810e0/resource/visa/js/jquery.js” in the chrome.webRequest.onBeforeSendHeaders.addListener
where you would usually redirect the request, you cancel it.
you attach a content script that attaches a script tag that ether points to the local jQuery (you would need to add the fire to the web_accessible_resources, which is a privacy issue) or includes the jQuery code directly.
You would want the content script to run at document_start, and will have to attach the script to document.documentElement, becaus the head and body won’t exist yet.
But as I said, I can’t imagine that this is worth the trouble (if the server is set up properly for caching).
Oh, and this won’t work if the server send a CSP, which can also be a reason why your current attempt fails.
I didn’t say or imply that, I just wanted to know what exactly you meant.
But as you said youself, it doesn’t work. (Or your problem is something different. I’m not even sure if Firefox allows a redirect to the moz-extension: protocol. By the way, is the jQuery script listed as web_accessible_resource?)
Oh I also see these errors in the background script:
Security Error: Content at https://www.irctc.co.in/eticketing/loginHome.jsf may not load or link to file:///D:/WORKAREA/work/htdocs/netbeans8/webtrial-1/irctc_paid/public_html/resources/irctc/PackedCompressed/packed.js.
It means the redirected localized versions are not allowed to run due to security error. However those have been added in “web_accessible_resources” in manifest.json and already working in Google Chrome