title: Prevent redirect loop in website
body: <p>i'm a user of a site (of which I have no control on) which sometimes presents a redirect loop (page A redirects to B, and B to A). Removing a specific cookie fixes the issue. I'd like to automatize the suppression of that cookie when a direct loop is detected.
  I was thinking of developing a small chrome extension for that effect (which would be the first plugin I write). Would that work?
  I tried using the webRequest API (onBeforeRedirect), but it doesn't seem to catch the redirect.</p>
  
  <p>Here is my manifest.json:</p>
  
  <pre><code>{
    "manifest_version": 2,
  
    "name": "name",
    "description": "description",
    "version": "1.0",
  
    "permissions": [
      "&lt;all_urls&gt;","webRequest","webRequestBlocking"
    ],
    "background": {
      "scripts": ["test.js"],
      "persistent": true
    }
  }
  </code></pre>
  
  <p>And here is my test.js:</p>
  
  <pre><code>var callback = function(details) {
      console.log("redirect caught!");
  };
  
  chrome.webRequest.onBeforeRedirect.addListener(callback);
  </code></pre>
  
  <p>What am I doing wrong ?</p>