# WebExtensions : Redirect url in private mode on Chrome & Opera

**URL:** https://discourse.mozilla.org/t/webextensions-redirect-url-in-private-mode-on-chrome-opera/22303
**Category:** Development
**Created:** [November 22, 2017, 2:46pm UTC](https://discourse.mozilla.org/t/webextensions-redirect-url-in-private-mode-on-chrome-opera/22303 "2017-11-22T14:46:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Baptistou](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Baptistou](https://discourse.mozilla.org/u/Baptistou)
#### Post date: [November 22, 2017, 2:46pm UTC](https://discourse.mozilla.org/t/webextensions-redirect-url-in-private-mode-on-chrome-opera/22303/1 "2017-11-22T14:46:08Z")

</div>

I am trying to redirect url when a specific tab is created in a background script. In Firefox it works, in Chrome & Opera it works in normal window but in private window I have the following message : “Requests to the server were blocked by an addon. Try to deactivate addons.”.  
I tried with browser.tabs.update and browser.webRequest.onBeforeRequest as below but none works :

```

browser.webNavigation.onCreatedNavigationTarget.addListener(function(info){
	if(info.tabId==MYTAB) browser.tabs.update(info.tabId,{url: MYURL});
});

browser.webRequest.onBeforeRequest.addListener(
	function(info){
		if(info.tabId==MYTAB) return {redirectUrl: MYURL};
	},
	{urls: ["<all_urls>"], types: ["main_frame"]},
	["blocking"]
);

```

Google Chrome :

 ![image](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/d/2/d21498dcb58f2d268c92b90d7d684052c6160ad7.png)  
Opera :  
 ![image](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/e/6/e63db61a90a993892ac7e1df9e49f898de5333f3.png)

Does someone have any idea? 🤔  
I still have no solution…
