title: Constantly updating cookie causes browser crash
body: <p><strong>PROBLEM BACKGROUND:</strong></p>
  
  <p>I usually leave my browser parked on my fantasy baseball live scoring page overnight. The next day, the browser is always sluggish and frequently crashes.</p>
  
  <p>After some investigation, I'm convinced it's caused by a cookie being updated every 1 second by the site. If I have 5 tabs open on the sites' domain (which I frequently do), it updates the cookie 5 times per second.</p>
  
  <p><strong>DEBUGGING:</strong></p>
  
  <p>I use Firefox 4.0 with firebug and firecookie.</p>
  
  <p>The session cookie is called "<em>fsr.a</em>" and contains a *nix timestamp. I believe it's called "foresee-trigger" and it's some kind of adware.</p>
  
  <p>You can see it in action here (no need to log in): <a href="http://www.cbssports.com/" rel="nofollow">http://www.cbssports.com/</a></p>
  
  <p>The cookie seems to be set by this file: <a href="http://sports.cbsimg.net/js/phase2-min-v0047.js" rel="nofollow">http://sports.cbsimg.net/js/phase2-min-v0047.js</a></p>
  
  <p><strong>THE FIX:</strong></p>
  
  <p>I've tried Adblocking it, but that broke the site. I tried writing a Greasemonkey script to counter it, but I'm not good enough with JS yet. I obviously can't block all cookies on the domain.</p>
  
  <p>Just looking for ideas or maybe a pointer in the right direction with a Greasemonkey script.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I wonder if I can just change the timer variable with Greasemonkey to update the cookie less frequently?</p>
  
  <p>For reference, I believe this is the code responsible for the "<em>fsr.a</em>" cookie:</p>
  
  <pre><code>var FSR = {
      version: "5.3.0",
      date: "11/11/2009",
      enabled: true,
      files: "http://images.cbssports.com/script/foresee/",
      id: "7alXWMyc064b1ROgR/DloA==",
      sites: [{
          path: /\w+-?\w+\.(com|org|edu|gov|net)/
      }, {
          path: ".",
          domain: "default"
      }]
  };
  
  function fsr$setAlive() {
      var a = new Date().getTime();
      document.cookie = "fsr.a=" + a + ";path=/" + ((FSR.site.domain) ? ";domain=" + FSR.site.domain + ";" : ";")
  }(function () {
      if (window != window.top) {
          return
      }
      function g(k) {
          if (typeof k == "object") {
              var l = k.constructor.toString().match(/array/i);
              return (l != null)
          }
          return false
      }
      var e = FSR.sites;
      for (var h = 0, a = e.length; h &lt; a; h++) {
          var c;
          if (!g(e[h].path)) {
              e[h].path = [e[h].path]
          }
          for (var j = 0, b = e[h].path.length; j &lt; b; j++) {
              if (c = document.location.href.match(e[h].path[j])) {
                  FSR.siteid = h;
                  FSR.site = FSR.sites[FSR.siteid];
                  if (!FSR.site.domain) {
                      FSR.site.domain = c[0]
                  } else {
                      if (FSR.site.domain == "default") {
                          FSR.site.domain = false
                      }
                  }
                  if (!FSR.site.name) {
                      FSR.site.name = c[0]
                  }
                  var d = ["files", "js_files", "image_files", "html_files"];
                  for (var h = 0, f = d.length; h &lt; f; h++) {
                      if (FSR.site[d[h]]) {
                          FSR[d[h]] = FSR.site[d[h]]
                      }
                  }
                  break
              }
          }
          if (c) {
              break
          }
      }
      if (!window["fsr$timer"]) {
          fsr$setAlive();
          window["fsr$timer"] = setInterval(fsr$setAlive, 1000)
      }
  })();
  </code></pre>
  
  <p>Alternate paste: <a href="http://pastebin.com/YrHFCZn1" rel="nofollow">http://pastebin.com/YrHFCZn1</a></p>