I have a Chrome extension that basically functions like an advanced "offline mode", where I save all resources requested, and can provide them later when the user requests the url cached resource.
I'm using the webRequest API, and mostly things are working:
- The extension is hitting all events I'm registering for
- The extension is saving files using the HTML5 filesystem API correctly, and I have found the files stored correctly on my machine.
- The extension is able to redirect requests in the
onBeforeRequest
listener to other http: requests - I am able to access my stored files in Chrome through the
filesystem:
protocol (like filesystem:chrome-extension://<myExtHere>/persistent/<filename>)
However, I am unable to redirect webRequest requests to urls using the filesystem:
protocol. When I try, I get an onErrorOccurred
event (error below.)
How can I redirect a chrome webRequest to a filesystem:chrome-extension://
url? or, failing that,
How can I redirect a Chrome extension to a local file that the same extension created?
Here is the full error details object, in case it helps.
error: "net::ERR_ABORTED"
frameId: 0
fromCache: false
method: "GET"
parentFrameId: -1
requestId: "22557"
tabId: 6
timeStamp: 1386874360306.4211
type: "main_frame"
url: "http://<redacted, but correct.>"
This should help some..