Closed machawk1 closed 11 years ago
Invalid ticket. This method is no longer used to capture 3xx codes and redirect as of commit 9b140a63a93ed64a61ce0296c74f6d99ef994ba4 . Now, the requests with a 3xx code resulting are put into an array that is later checked. Because the browser and JavaScript cannot prevent the 3xx codes (without completely blocking), the implemented method is more functional.
chrome.webRequest.onHeadersReceived.addListener( function(details){
var newURI = mementoStart(details); return {redirectUrl: newURI}; //this doesn't work } }, { urls:["http://_/_", "https://_/_"], types: ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", "other"] }, ["blocking","responseHeaders"] );
Appears to be not possible from http://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse